In [32]:
import json
import numpy as np
import pandas as pd
with open('dt_evalutation_results.json') as jf:
rec = json.loads(jf.readline())
rec[u'Features'] = '|'.join(rec[u'Features'])
i = 0
df = pd.DataFrame(rec, index=[i])
for line in jf:
i += 1
rec = json.loads(line)
rec[u'Features'] = '|'.join(rec[u'Features'])
df = pd.concat([df, pd.DataFrame(rec, index=[i])], axis=0, ignore_index=True)
In [34]:
best = df.F1_score_yes.argmax()
print(df.iloc[best])
print(df.iloc[best].Features)
In [35]:
best = df.Recall_yes.argmax()
print(df.iloc[best])
print(df.iloc[best].Features)
In [ ]:
In [ ]:
In [ ]:
In [ ]: