This project demonstrates how to use the Iris dataset with Tribuo.
You can manually download and extract the data:
- Download the data from: https://archive.ics.uci.edu/static/public/53/iris.zip
- Extract the contents of the zip file into a folder named
datain the project root.
Alternatively, use the following bash command:
rm -rf data && mkdir -p data \
&& curl -L https://archive.ics.uci.edu/static/public/53/iris.zip -o data/iris.zip \
&& unzip data/iris.zip -d data \
&& rm data/iris.zipYou can manually download and extract the data:
- Download the data from: https://www.kaggle.com/api/v1/datasets/download/pranavrawat1301/fraud-detection
- Extract the contents of the zip file into a folder named
datain the project root.
Alternatively, use the following bash command:
rm -rf data && mkdir -p data \
&& curl -L https://www.kaggle.com/api/v1/datasets/download/pranavrawat1301/fraud-detection -o data/fraud-detection.zip \
&& unzip data/fraud-detection.zip -d data \
&& mv data/fraud-detection.csv data/Fraud.csv \
&& rm data/fraud-detection.zipBefore training the model, ensure that the project is built:
mvn clean installTo train the model, run the TrainModel class. This will load the fraud detection dataset, split it into training and testing sets, train an XGBoost model, evaluate its performance, and save the model to models/model.tribuo.
mvn exec:java -Dexec.mainClass=ua.lviv.javaclub.tribuo.training.TrainModelOnce the model is trained and saved, you can use the Predict class to make predictions on new data.
mvn exec:java -Dexec.mainClass=ua.lviv.javaclub.tribuo.predict.Predict