Commit 3a8b5e5f authored by Guolin Ke's avatar Guolin Ke
Browse files

fix pmml.py

parent a5f11d47
......@@ -87,6 +87,8 @@ with open(argv[1], 'r') as model_in:
model_content = iter([line for line in model_in.read().splitlines() if line][6:])
feature_names = get_array_strings(next(model_content))
feature_infos = get_array_strings(next(model_content))
segment_id = count(1)
with open('LightGBM_pmml.xml', 'w') as pmml_out:
......@@ -136,6 +138,8 @@ with open('LightGBM_pmml.xml', 'w') as pmml_out:
leaf_count = get_array_strings(next(model_content))
internal_value = get_array_strings(next(model_content))
internal_count = get_array_strings(next(model_content))
shrinkage = get_value_string(next(model_content))
has_categorical = get_value_string(next(model_content))
unique_id = count(1)
print_pmml()
out_("\t\t\t</Segment>")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment