hyperopt

PHOTO EMBED

Fri Jul 14 2023 11:45:34 GMT+0000 (Coordinated Universal Time)

Saved by @sidd

hyperopt_results=pd.DataFrame(columns=["results", 'max_depth','max_feature', 'n_estimators']
)
for i in trials.trials:
#     print(i['result'],i['misc']['vals'])
    hyperparams=i['misc']['vals']
    a=i['result']['loss']
    j=[]
    j.append(a)
    for key,value in hyperparams.items():
        j.append(value[0])
#     print(j)
    hyperopt_results.loc[len(hyperopt_results.index)]=j

for i in hyperopt_results.columns.tolist():
    plt.figure()
    sns.scatterplot(data=hyperopt_results,x=i,y='results')
content_copyCOPY