XGBoost

The xgboost_sample.py example demonstrates integrating Trains into code that trains a network on the scikit-learn iris classification dataset, using XGBoost to do the following:

and scikit-learn to score accuracy (sklearn.metrics.accuracy_score).

Trains automatically logs input model, output model, model snapshots (checkpoint models), feature importance plot, tree plot, and output to console.

When the script runs, it 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 Trains Web (UI), RESULTS tab, PLOTS sub-tab.

Log

All other console output appears in the RESULTS tab, LOG tab.

Artifacts

Trains tracks the input and output model with the experiment, but the Trains Web (UI) shows the model details separately.

Input model

In the experiment details, ARTIFACTS tab, Input Model area, you can see Trains logging of the input model.

In the model details (which appear when you click the model name, expand image above), you can see the following:

  • Input model location (URL)
  • Model snapshots / checkpoint model locations (URLs)
  • Experiment creating the model
  • Other general information about the model.

Output model

Trains logs the output model, providing the model name and output model configuration in ARTIFACTS tab, Output Model area.

In the model details GENERAL tab you can see:

  • Output model location (URL)
  • Model snapshots / checkpoint model locations (URLs)
  • Experiment creating the model
  • Other general information about the model.