running Auto_ViML with hyper_param='HO' throws an exception.
manugarri opened this issue · 4 comments
Im testing Auto_ViML with hyperopt on the titanic dataset, running it like this:
train, target, test,
verbose=0,
hyper_param='HO',
)```
This throws the following exception:
...
############### M O D E L B U I L D I N G B E G I N S ####################
Rows in Train data set = 640
Features in Train data set = 10
Rows in held-out data set = 161
Finding Best Model and Hyper Parameters for Target: Survived...
Baseline Accuracy Needed for Model = 62.17%
CPU Count = 8 in this device
Using Linear Model, Estimated Training time = 0.02 mins
Error: Not able to print validation metrics. Continuing...
Actual training time (in seconds): 0
########### S I N G L E M O D E L R E S U L T S #################
UnboundLocalError Traceback (most recent call last)
/tmp/core/run_auto-viml.py in
42 train, target, test,
43 verbose=0,
---> 44 hyper_param='HO',
45 )
46
/usr/local/lib/python3.7/site-packages/autoviml/Auto_ViML.py in Auto_ViML(train, target, test, sample_submission, hyper_param, feature_reduction, scoring_parameter, Boosting_Flag, KMeans_Featurizer, Add_Poly, Stacking_Flag, Binning_Flag, Imbalanced_Flag, verbose)
1725 ############## This is for Classification Only !! ########################
1726 if scoring_parameter in ['logloss','neg_log_loss','log_loss','log-loss','']:
-> 1727 print('{}-fold Cross Validation {} = {}'.format(n_splits, 'logloss', best_score))
1728 elif scoring_parameter in ['accuracy','balanced-accuracy','balanced_accuracy','roc_auc','roc-auc',
1729 'f1','precision','recall','average-precision','average_precision',
UnboundLocalError: local variable 'best_score' referenced before assignment
specifying the evaluation metric doesnt fix the issue.
Im using `autoviml==0.1.651`.
I haven't completed the HO hyper parameter tuning yet -> until then I suggest you use 'RS' or 'GS' for hyper_param parameter. sorry. Both work well.
got it, would be nice to mention that in the docs.
@manugarri please submit a PR for the readme