This method can be used when you are using any data-mining software other than SPSS Modeler.
Let's see how to do that:
- Go to the Field Ops palette and connect the SVM-generated model to a Derive node.
- We will use the Derive node to create a new field. We will edit this node and name it Combined_Prediction.
- Derive this field as a Conditional. You will see an if-else condition.
- Let's tell Modeler that if the predictions from all the models are equal then the combined prediction will be that prediction itself. To do this, let's add an expression in the first if condition as, the prediction from the Neural Net model, $N-Status select = the prediction of the SVM model, $S-Status; go to the Then condition, click on the expression builder and select, the prediction of the Neural Net model, $N-Status or alternatively, you can even select a prediction from the SVM model.
- Write in the Else condition, this statement: You can select the variable names from the list:
This statement means that we will select the Highest confidence from any of the models if the predictions of the two models do not match. And if the confidence of the prediction from the Neural Net model is higher than that of the SVM model, then we will go with the prediction of the Neural Net model. Otherwise, if the confidence of the prediction of the SVM model is higher than the Neural Net model, then we will go with the SVM model. But, if both the conditions don't satisfy, then we will put a 0, and then we have to end with an endif statement. Click on OK.
- Connect the Combined_prediction node to the Table mode and let's see the results take a look at the results, as shown in the following screenshot:
Here, in the 12th row, we can see that the neural network predicted a customer as Churned whereas the SVM predicted it as Current, but as the confidence of the Neural Net prediction was higher, the combined prediction was picked as Churned.
- You can analyze this model and see for yourself that the numbers that will be acquired will be similar to the numbers that we had using the Ensemble node.
This is how we combined two models to improve accuracy and we saw how we can get the combined results from the two models. You can try this out with three or more models. You will be amazed at how well combining models can work. We will now see another advanced method to improve the model.