Add XGBoost example docs (#148)

This commit is contained in:
pollfly 2022-01-02 16:23:06 +02:00 committed by GitHub
parent da5360cc5d
commit ec46957110
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 38 additions and 4 deletions

View File

@ -0,0 +1,34 @@
---
title: XGBoost Metric Reporting
---
The [xgboost_metrics.py](https://github.com/allegroai/clearml/blob/master/examples/frameworks/xgboost/xgboost_metrics.py)
example demonstrates the integration of ClearML into code that uses XGBoost to train a network on the scikit-learn [iris](https://scikit-learn.org/stable/modules/generated/sklearn.datasets.load_iris.html#sklearn.datasets.load_iris)
classification dataset. ClearML automatically captures models and scalars logged with XGBoost.
When the script runs, it creates a ClearML experiment named `xgboost metric auto reporting`, which is associated with
the `examples` project.
## Scalars
ClearML automatically captures scalars logged with XGBoost, which can be visualized in plots in the
ClearML WebApp, in the experiment's **RESULTS > SCALARS** page.
![Scalars](../../../img/examples_xgboost_metric_scalars.png)
## Models
ClearML automatically captures the model logged using the `xgboost.save` method, and saves it as an artifact.
View saved snapshots in the experiment's **ARTIFACTS** tab.
![Artifacts tab](../../../img/examples_xgboost_metric_artifacts.png)
To view the model details, click the model name in the **ARTIFACTS** page, which will open the model's info tab. Alternatively, download the model.
![Model info panel](../../../img/examples_xgboost_metric_model.png)
## Console
All console output during the scripts execution appears in the experiments **RESULTS > CONSOLE** page.
![Console output](../../../img/examples_xgboost_metric_console.png)

View File

@ -1,9 +1,9 @@
---
title: XGBoost
title: XGBoost and scikit-learn
---
The [xgboost_sample.py](https://github.com/allegroai/clearml/blob/master/examples/frameworks/xgboost/xgboost_sample.py)
example demonstrates integrating **ClearML** into code that trains a network on the scikit-learn [iris](https://scikit-learn.org/stable/modules/generated/sklearn.datasets.load_iris.html#sklearn.datasets.load_iris)
example demonstrates integrating ClearML into code that trains a network on the scikit-learn [iris](https://scikit-learn.org/stable/modules/generated/sklearn.datasets.load_iris.html#sklearn.datasets.load_iris)
classification dataset, using XGBoost to do the following:
* Load a model ([xgboost.Booster.load_model](https://xgboost.readthedocs.io/en/latest/python/python_api.html#xgboost.Booster.load_model))
@ -14,7 +14,7 @@ classification dataset, using XGBoost to do the following:
And using scikit-learn to score accuracy ([sklearn.metrics.accuracy_score](https://scikit-learn.org/stable/modules/generated/sklearn.metrics.accuracy_score.html)).
**ClearML** automatically logs:
ClearML automatically logs:
* Input model
* Output model
* Model checkpoints (snapshots)

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

View File

@ -92,7 +92,7 @@ module.exports = {
'Tensorflow': ['guides/frameworks/tensorflow/tensorboard_pr_curve', 'guides/frameworks/tensorflow/tensorboard_toy',
'guides/frameworks/tensorflow/tensorflow_mnist', 'guides/frameworks/tensorflow/integration_keras_tuner']
},
'guides/frameworks/xgboost/xgboost_sample'
{'XGBoost': ['guides/frameworks/xgboost/xgboost_sample', 'guides/frameworks/xgboost/xgboost_metrics']}
]},
{'IDEs': ['guides/ide/remote_jupyter_tutorial', 'guides/ide/integration_pycharm', 'guides/ide/google_colab']},
{'Offline Mode':['guides/set_offline']},