Here are the examples for XGboost multiclass and multilabel classification cited in the Medium article I wrote.
For multiclass, you want to set the objective
parameter to multi:softmax
.
objective:
multi:softmax
: set XGBoost to do multiclass classification using the softmax objective, you also need to set num_class(number of classes)
Multiclass examples in xgboost-multiclass/
Install dependencies by running:
pip install -r requirements.txt
(You want to be using an environment to install this dependencies. If you're unsure on how to use one, follow the docs.)
[1] Wine Data Set: does not need to be downloaded. Can be loaded from Sklearn module using
from sklearn.datasets import load_wine
[2] Anuran Calls (MFCCs) Data Set
Download the zip folder to datasets/
.
wget https://archive.ics.uci.edu/ml/machine-learning-databases/00406/Anuran%20Calls%20\(MFCCs\).zip -P datasets
Extract the zip folder so we can access Frogs_MFCCs.csv
.
unzip datasets/Anuran\ Calls\ \(MFCCs\).zip -d datasets