Generating Models
WSO2 Machine Learner has two main entities, namely Datasets and Projects. A project is bound to a dataset. Thereby, when you are creating a project you need to choose an existing dataset.
You create several analyses for a project. An analysis is a workflow that is created to cover the full machine learning pipeline from data extraction to model generation. Once you create an analysis, you are walked through a wizard to perform feature extraction, algorithm selection, and hyper parameter calibration. After that process, you could run an analysis on a selected version of the project's dataset. On a successful run of an analysis, a machine learning model will be generated and stored in a path you have specified.
You can generate models based on the the above workflow using the WSO2 ML UI as described below.
Creating a project
Follow the steps below to create a project using a created dataset.
- Start the WSO2 ML server. For instructions on starting, see Running the Product.
Access the ML UI from your Web browser using the following URL: https://<ML_HOST>:<ML_PORT>/ml
You can find the URL of the WSO2 ML UI in the server startup logs in the CLI as follows: I
NFO{org.wso2.carbon.ml.core.internal.MLCoreDS} - WSO2 Machine Learner UI : https://127.0.0.1:9443/ml
Log in to the ML UI as a user who is registered in WSO2 ML. For registering users, see User Management.
Click PROJECTS in the top menu as shown below.
Click CREATE PROJECT.
Enter the following details of the project.
Give a preferred name and a description. If you navigated directly from a dataset, that dataset will be selected, else you can select a created dataset from the drop down list.
Once the project is successfully created, you view it as shown below indicating that there are no analyses available for it. Use the provided option to delete the project or to create an analysis using the created project.
Filtering projects based on datasets
Follow the steps below to search and filter all projects that are based on a particular dataset using the ML UI.
- Log in to the WSO2 ML UI, if you are not already logged in.
- Click the Projects button as shown below.
- Select the dataset of which you want to retrieve all projects associated to it in the search field provided as shown below.
You view all filtered projects that are associated with the selected dataset as shown below.
Creating an analysis
To start building ML models, you need to create an analysis. Follow the steps below to create an analysis.
- Log in to the WSO2 ML UI, if you are not already logged in.
Click PROJECTS in the top menu as shown below.
- Click on the project in which you need to create the analysis.
- Enter a name for the analysis, and click CREATE ANALYSIS as shown below.
Enter details in the Step 1 - Preprocess as shown below. You can browse for a certain feature using the Search option provided.
Specify the following details for each feature as preferred:
- Include - If the feature should be included in the model or not.
- Type - Whether the feature is of the type numerical or categorical.
- Impute - Whether to impute missing values of a data row by discarding it or replacing it with the mean. In a dataset, an empty space, value NA or ? (question mark) are considered as missing values.
- Click Next.
Enter details in the Step 2 - Explore as shown below. For more information on exploring data, see Exploring Data.
This step visualizes different aspects of the dataset using several chart types (i.e. scatter plot, parallel sets, trellis chart, and cluster diagram). All these chart types might not be available for all datasets due to feature types.
- Click Next.
Enter details in the Step 3 - Algorithms as shown below.
Select an algorithm to use for the model, and the response variable from the drop down list. Set the proportion of the dataset to be used for training for Train data fraction field.
- Click Next.
Enter details in the Step 4 - Parameters as shown below.
Set hyper-parameters of the selected algorithm. These hyper-parameters are already set with default values. Therefore, you can either opt to keep those values, or modify them as desired.
- Click Next.
Enter details in the Step 5 - Model as shown below.
Select the version of the dataset which to use to train the model.
Clicking Run, to build the model. As a result, the model training starts in the background and a list of all the models of the analysis is displayed as shown below.
Once the model building completes, you can perform the below actions on that model.- VIEW - To view the summary of that model. You view relevant visualizations and tables according to the training algorithm as shown below.
- PREDICT - To make predictions on the model.
- DOWNLOAD - To prompt the download window, so that you can locally save the model in a preferred location.
- PUBLISH - To publish the model into WSO2 ML registry. A model can be published as a serialised model or in PMML format.
- DELETE - To permanently delete the model.
- VIEW - To view the summary of that model. You view relevant visualizations and tables according to the training algorithm as shown below.
Creating a new model within an analysis
Follow the steps below to create a new model for the same analysis using another version of the dataset, while all the other configurations remain the same.
- Log in to the WSO2 ML UI, if you are not already logged in.
Click PROJECTS in the top menu as shown below.
- Click on the project in which you need to create the analysis.
- Click MODELS as shown below.
- Click CREATE MODEL.
- Select the version of the dataset using which you want to create a new model as shown below.
Click Run. You view the new model added to the list of all available models in that analysis as shown below.Once the model building completes, you can perform the below actions on that model.
- VIEW - To view the summary of that model. You view relevant visualizations and tables according to the training algorithm as shown below.
- PREDICT - To make predictions on the model.
- DOWNLOAD - To prompt the download window, so that you can locally save the model in a preferred location. A model can be downloaded in a serialized format or in PMML format.
- PUBLISH - To publish the model into WSO2 ML registry. A model can be published in a serialized format or in PMML format.
- DELETE - To permanently delete the model.
- VIEW - To view the summary of that model. You view relevant visualizations and tables according to the training algorithm as shown below.
Viewing an analysis
Follow the steps below to view the configurations of an analysis.
Once you create an analysis, you cannot change any of the configurations of it.
- Log in to the WSO2 ML UI, if you are not already logged in.
Click PROJECTS in the top menu as shown below.
- Click on the project in which you need to view the analysis.
- Click VIEW as shown below.
You view a summary of all the configurations of that analysis as shown below.