davidsbatista / machine-learning-notebooks

Assorted exercises and proof-of-concepts to understand and study machine learning and statistical learning theory
45 stars 26 forks source link

Support for best_estimator_? #3

Open browshanravan opened 3 years ago

browshanravan commented 3 years ago

I was wondering if you have any plans to include the learned best_estimator_ attribute for your EstimatorSelectionHelper() function?

This will allow using the calculated best estimator and its corresponding hyper-parameters to be used for test data evaluation and more.

I was hoping to achieve something like this:

helper = EstimatorSelectionHelper(models, params)
helper.fit(X_train, y_train, scoring='roc_auc')
helper.best_estimator_.predict(X_test)

I guess given that people might like to select a particular parameter such as "mean_score" as measure of best estimator, it needs to be provided as an option somewhere. Perhaps as an argument in the fit process?