Apply Model
Apply model tab is for applying your trained model to your test data. Before using the Apply model tab, you must create a model using the train model tab.
Figure: Apply model user interface
Objectives
By the end of this lesson, you will be
- familiar with the apply model tab and
- learn how to use this tab for applying your model.
Note
This tutorial assumes that you have already selected a project and imported data. For more information, please see the Import Data section in Getting Started. You must create a model using the train model tab and load it from the job before applying a model to your data.
Familiarity with the user interface
Apply model operation configuration is divided into two main settings. 1. Main settings 2. Optional settings
Main Settings
You must have to select all the options here.
Choose Model
Single select dropdown. You can select only one model here. Do not select any feature signal here.
Select features
Select the features here that you want to apply to the model. You have to select the same number of signals you have selected during training the model. Then you have to match these features with the signals you have selected during training the model. A pop window will appear, and you have to confirm the matching. This matching is important because you have to make sure that you have selected the same type of features as you have selected during training the model. Also, suppose these features names are different from those you have selected during training the model. You have to match currently selected features with the signals you have selected during training the model. If any signal is selected twice, it will be shown in the multiple used features list, and if there is an unused feature, it will be shown in the unused features list. After matching, you have to click on the confirm button.
Optional settings
Selections are optional here. There are two options here: - Predict probability: If you want to predict probability, you have to select this option. - Save test features: If you want to save the test features, you have to select this option.
Note
The following sections assume that you already know how to use apply model tab. If not then please learn how to use train model tab from above.
Apply Model Example - Iris Species Prediction Based on Test Data
Here we will do all the steps to apply a model for predicting iris species. Here we assume that you already have imported the iris test data and trained model.
Objectives
By the end of this section, you will be - able to predict iris species based on test data - able to see the applied results
Configurations
Main settings configurations.
Main Settings
Figure: Train model main settings
Follow these steps: - select the model that you want to apply. Adaboost model is chosen here as an example. - select feature sepal_length, sepal_width, petal_length and petal_width - press the match feature button and ensure that you have selected the same features as you have used while training the model. - press confirm button. - press the preview button on the optional settings area
Figure: Matching train and test features
Results
Preview will show below result:
Figure: Apply model prediction result
If you check Predict Probability option then you will get below result:
Figure: Apply model prediction result with probability
Result Discussions
There will be a plot on the left side and a table on the right side on the preview click. In plot six, signals are plotted. The most important features from the train signals and target are plotted from training data. And Matched most important features from test data and prediction are plotted from test or apply data. In the table, the first column is the prediction. And if you have selected Predict Probability, then beside the predicted signal, you will also get the probability of each class in separate columns. Finally, if you have chosen the Save Test Feature option, you can get those features after loading the job.
Q & A
Q. Why do I have to match the features?
Suppose you have trained your model with a target Salary and four features, namely Experience, Technology, Backend, Frontend. Now you want to predict salary on new data, such as WorkYear, ProgrammingLanguage, BackendFamework, FrontendFramework. All are the same, but you can confirm that the model can use WOrkYear as Experience, ProgrammingLanguage as Technology, etc.