This component extends the capabilities of SAP Predictive Analysis and adds an stand-alone confusion matrix. Such a chart can be helpful to understand the strength of a classification model.
Out-of-the box SAP Predictive Analysis already displays a confusion matrix for the data the model was trained on. However, to understand the quality of a model, it is also important to verify the model against data that was not used to create the model in the first place. You can use this Custom R Component for that purpose. You can also use it to visualise the predictions of other classification methods you might have added yourself to the SAP Predictive Analysis framework.
Disclaimer
Please note that this component is provided as-is without any guarantee or support.
Prerequisites
The dataset must include the actual and predicted classification.
The R-libraries caret, lattice and ggplot2 have to be installed.
Usage
These parameters can be set by the user.
Parameter | Description |
---|---|
Actuals | Name of categorical column that holds the actual classification. |
Predictions | Name of categorical column that holds the predicted classification. |
Output Columns: Unchanged input data.
How to Implement
The component is attached to this article. Download and unzip the file. You will see a Text file. Rename its .txt extension to .zip and unpack the new file as well. The content of the .zip file is the Custom R Component. These steps are needed as SCN does not allow the attachment of the component's original file type.
Then deploy the component as described here. You just need to copy the attached content in a folder described in the article and restart SAP Predictive Analysis.
Example
In this analysis the Confusion Matrix is used to display how accurately a trained decision tree predicts the classification on some test data, for which the actual classification is already known.
The Confusion Matrix is configured as follows:
And the confusion matrix itself:
Disclaimer
Please note that this component is provided as-is without any guarantee or support.