Skip to content

Commit

Permalink
Some more lines are added to the exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
Nirmal-Neel committed Sep 14, 2018
1 parent f558bd0 commit 2811cd1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions nyoka/lgbm/lgb_to_pmml.py
Expand Up @@ -66,6 +66,13 @@ def lgb_to_pmml(pipeline, col_names, target_name, pmml_f_name='from_lgbm.pmml'):
**PMML_kwargs
)
pmml.export(outfile=open(pmml_f_name, "w"), level=0)
read_file = open(pmml_f_name, 'r')
lines = read_file.readlines()
lines.insert(1,'<!--(Comment generated by ADAPA) PMML processed by ADAPA (Version : 4.3)-->\n')
read_file.close()
read_file = open(pmml_f_name, 'w')
read_file.writelines(lines)
read_file.close()

def get_PMML_kwargs(model, derived_col_names, col_names, target_name, mining_imp_val,categoric_values):
"""
Expand Down

0 comments on commit 2811cd1

Please sign in to comment.