Table of Contents | ||
---|---|---|
|
Introduction
This sample demonstrates how a model is generated out of a data set using the decision tree algorithm. The sample uses a data set to generate a model, which is divided into two sets for training and testing.
Prerequisites
Download WSO2 Machine Learner, and start the server.
Building the sample
Execute the following command to download the source code of the product: git clone https://github.com/wso2/product-ml.git
Executing the sample
Once the sample is successfully executed, you can obtain the following output.
If you already executed a sample before, execute the following command to remove the databases created:
rm -rf repository/database/WSO2ML_DB.*
Navigate to
<ML_HOME>/samples/rest-api/decision-tree/
directory using the CLI.Info <ML_HOME>
refers to the downloadedproduct-ml
directory with the source code of the product- Execute the following command to execute the sample:
sh model-generation.sh
Output of the sample
Once the sample is successfully executed, you can obtain the following output.
...