clearml-docs/docs/guides/frameworks/xgboost/xgboost_sample.md
2022-05-22 10:27:30 +03:00

39 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
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 uses [XGBoost](https://xgboost.readthedocs.io/en/stable/).
The example does the following:
* 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
* Scores accuracy using scikit-learn
* ClearML automatically logs the input model registered by XGBoost, and the output model (and its checkpoints),
feature importance plot, and tree plot created with XGBoost.
* Creates an experiment named `XGBoost simple example`, which is associated with the `examples` project.
## Plots
The feature importance plot and tree plot appear in the project's page in the **ClearML web UI**, under
**PLOTS**.
![image](../../../img/examples_xgboost_sample_06.png)
## Console
All other console output appear in **CONSOLE**.
![image](../../../img/examples_xgboost_sample_05.png)
## Artifacts
Models created by the experiment appear in the experiments **ARTIFACTS** tab. ClearML automatically logs and tracks
models and any snapshots created using XGBoost.
![image](../../../img/examples_xgboost_sample_10.png)
Clicking on the model's name takes you to the [models page](../../../webapp/webapp_model_viewing.md), where you can
view the models details and access the model.
![image](../../../img/examples_xgboost_sample_03.png)