mljar-supervised icon indicating copy to clipboard operation
mljar-supervised copied to clipboard

How to get cross validation scores from AutoML object?

Open stepthom opened this issue 4 years ago • 3 comments
trafficstars

How can I obtain the cross validation scores that were obtained during the call to fit()?

E.g.:

 from supervised.automl import AutoML # mljar-supervised
        
        automl_settings = {
            "mode": "Compete",
            "model_time_limit": search_time,
            "eval_metric": eval_metric,
            "stack_models": True,
            "explain_level": 0,
            "feature_selection": False,
            "algorithms": ["Linear", "Decision Tree", "Random Forest", "LightGBM", "Xgboost", "Catboost", "Neural Network"],
            "golden_features": True,
            "n_jobs": 8,
            "verbose": 1,
        }
        
        pipe = AutoML(**automl_settings)
        pipe.fit(X_train, y_train)

       # TODO: what to put here?
       # pipe.scores_  ???


stepthom avatar Jul 15 '21 18:07 stepthom

There should be output directory with all results created after fit. There will be readme file with markdown report. If you are in notebook then you can also call pipe.report() to display interctive report with all results.

pplonski avatar Jul 15 '21 19:07 pplonski

Thanks, @pplonski. In the future, it might make sense to add a feature to allow these scores to be obtained via the AuotML object directly so that one can get them programmatically after fit().

stepthom avatar Jul 16 '21 10:07 stepthom

There is one more option pipe.get_leaderbord(). Does it work for you?

pplonski avatar Jul 16 '21 11:07 pplonski