mljar / mljar-supervised

Python package for AutoML on Tabular Data with Feature Engineering, Hyper-Parameters Tuning, Explanations and Automatic Documentation
https://mljar.com
MIT License
3.05k stars 406 forks source link

How to get cross validation scores from AutoML object? #434

Open stepthom opened 3 years ago

stepthom commented 3 years ago

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_  ???
pplonski commented 3 years ago

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.

stepthom commented 3 years ago

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().

pplonski commented 3 years ago

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