mirror of
https://github.com/microsoft/autogen.git
synced 2026-04-20 03:02:16 -04:00
roc_auc_weighted metric addition (#827)
* Pending changes exported from your codespace * Update flaml/automl.py Co-authored-by: Chi Wang <wang.chi@microsoft.com> * Update flaml/automl.py Co-authored-by: Chi Wang <wang.chi@microsoft.com> * Update flaml/ml.py Co-authored-by: Chi Wang <wang.chi@microsoft.com> * Update flaml/ml.py Co-authored-by: Chi Wang <wang.chi@microsoft.com> * Update website/docs/Examples/Integrate - Scikit-learn Pipeline.md Co-authored-by: Chi Wang <wang.chi@microsoft.com> * added documentation for new metric * Update flaml/ml.py Co-authored-by: Chi Wang <wang.chi@microsoft.com> * minor notebook changes * Update Integrate - Scikit-learn Pipeline.md * Update notebook/automl_classification.ipynb Co-authored-by: Chi Wang <wang.chi@microsoft.com> * Update integrate_azureml.ipynb Co-authored-by: Chi Wang <wang.chi@microsoft.com>
This commit is contained in:
@@ -32,6 +32,7 @@ automl_pipeline = Pipeline([
|
||||
])
|
||||
automl_pipeline
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Run AutoML in the pipeline
|
||||
@@ -39,7 +40,7 @@ automl_pipeline
|
||||
```python
|
||||
automl_settings = {
|
||||
"time_budget": 60, # total running time in seconds
|
||||
"metric": "accuracy", # primary metrics can be chosen from: ['accuracy','roc_auc', 'roc_auc_ovr', 'roc_auc_ovo', 'f1','log_loss','mae','mse','r2']
|
||||
"metric": "accuracy", # primary metrics can be chosen from: ['accuracy', 'roc_auc', 'roc_auc_weighted', 'roc_auc_ovr', 'roc_auc_ovo', 'f1', 'log_loss', 'mae', 'mse', 'r2'] Check the documentation for more details (https://microsoft.github.io/FLAML/docs/Use-Cases/Task-Oriented-AutoML#optimization-metric)
|
||||
"task": "classification", # task type
|
||||
"estimator_list": ["xgboost", "catboost", "lgbm"],
|
||||
"log_file_name": "airlines_experiment.log", # flaml log file
|
||||
@@ -61,4 +62,4 @@ print('Best accuracy on validation data: {0:.4g}'.format(1 - automl.best_loss))
|
||||
print('Training duration of best run: {0:.4g} s'.format(automl.best_config_train_time))
|
||||
```
|
||||
|
||||
[Link to notebook](https://github.com/microsoft/FLAML/blob/main/notebook/integrate_sklearn.ipynb) | [Open in colab](https://colab.research.google.com/github/microsoft/FLAML/blob/main/notebook/integrate_sklearn.ipynb)
|
||||
[Link to notebook](https://github.com/microsoft/FLAML/blob/main/notebook/integrate_sklearn.ipynb) | [Open in colab](https://colab.research.google.com/github/microsoft/FLAML/blob/main/notebook/integrate_sklearn.ipynb)
|
||||
|
||||
@@ -59,6 +59,9 @@ The optimization metric is specified via the `metric` argument. It can be either
|
||||
- 'roc_auc': minimize 1 - roc_auc_score. Default metric for binary classification.
|
||||
- 'roc_auc_ovr': minimize 1 - roc_auc_score with `multi_class="ovr"`.
|
||||
- 'roc_auc_ovo': minimize 1 - roc_auc_score with `multi_class="ovo"`.
|
||||
- 'roc_auc_weighted': minimize 1 - roc_auc_score with `average="weighted"`.
|
||||
- 'roc_auc_ovr_weighted': minimize 1 - roc_auc_score with `multi_class="ovr"` and `average="weighted"`.
|
||||
- 'roc_auc_ovo_weighted': minimize 1 - roc_auc_score with `multi_class="ovo"` and `average="weighted"`.
|
||||
- 'f1': minimize 1 - f1_score.
|
||||
- 'micro_f1': minimize 1 - f1_score with `average="micro"`.
|
||||
- 'macro_f1': minimize 1 - f1_score with `average="macro"`.
|
||||
|
||||
Reference in New Issue
Block a user