Skip to main content

Performance (Classification)

Synopsis

This operator is used for statistical performance evaluation of classification tasks. This operator delivers a list of performance criteria values of the classification task.

Description

This operator should be used for performance evaluation of only classification tasks. Many other performance evaluation operators are also available in RapidMiner e.g. Performance operator, Performance (Binominal Classification) operator, Performance (Regression) operator etc. The Performance (Classification) operator is used with classification tasks only. On the other hand, the Performance operator automatically determines the learning task type and calculates the most common criteria for that type. You can use the Performance (User-Based) operator if you want to write your own performance measure.

Classification is a technique used to predict group membership for data instances. For example, you may wish to use classification to predict whether the train on a particular day will be 'on time', 'late' or 'very late'. Predicting whether a number of people on a particular event would be 'below- average', 'average' or 'above-average' is another example. For evaluating the statistical performance of a classification model the data set should be labeled i.e. it should have an attribute with label role and an attribute with prediction role. The label attribute stores the actual observed values whereas the prediction attribute stores the values of label predicted by the classification model under discussion.

Input

labeled data

This input port expects a labeled ExampleSet. The <reference key="operator.apply_model"> Apply Model </reference>operator is a good example of such operators that provide labeled data. Make sure that the ExampleSet has a label attribute and a prediction attribute. See the <reference key="operator.set_role">Set Role</reference> operator for more details regarding label and prediction roles of attributes.

performance

This is an optional parameter. It requires a Performance Vector.

Output

performance

This port delivers a Performance Vector (we call it output-performance-vector for now). The Performance Vector is a list of performance criteria values. The Performance vector is calculated on the basis of the label attribute and the prediction attribute of the input ExampleSet. The output-performance-vector contains performance criteria calculated by this Performance operator (we call it calculated-performance-vector here). If a Performance Vector was also fed at the performance input port (we call it input-performance-vector here), criteria of the input-performance-vector are also added in the output-performance-vector. If the input-performance-vector and the calculated-performance-vector both have the same criteria but with different values, the values of calculated-performance-vector are delivered through the output port. This concept can be easily understood by studying the attached Example Process.

example set

ExampleSet that was given as input is passed without changing to the output through this port. This is usually used to reuse the same ExampleSet in further operators or to view the ExampleSet in the Results Workspace.

Parameters

Main criterion

The main criterion is used for comparisons and needs to be specified only for processes where performance vectors are compared, e.g. attribute selection or other meta optimization process setups. If no main criterion is selected, the first criterion in the resulting performance vector will be assumed to be the main criterion.

Accuracy

Relative number of correctly classified examples or in other words percentage of correct predictions

Classification error

Relative number of misclassified examples or in other words percentage of incorrect predictions.

Kappa

The kappa statistics for the classification. It is generally thought to be a more robust measure than simple percentage correct prediction calculation since it takes into account the correct prediction occurring by chance.

Weighted mean recall

The weighted mean of all per class recall measurements. It is calculated through class recalls for individual classes. Class recalls are mentioned in the last row of the matrix displayed in the Results Workspace.

Weighted mean precision

The weighted mean of all per class precision measurements. It is calculated through class precisions for individual classes. Class precisions are mentioned in the last column of the matrix displayed in the Results Workspace.

Spearman rho

The rank correlation between the actual and predicted labels, using Spearman's rho. Spearman's rho is a measure of the linear relationship between two variables. The two variables in this case are label attribute and prediction attribute.

Kendall tau

The rank correlation between the actual and predicted labels, using Kendall's tau. Kendall's tau is a measure of correlation, and so measures the strength of the relationship between two variables. The two variables in this case are the label attribute and the prediction attribute.

Absolute error

Average absolute deviation of the prediction from the actual value. The values of the label attribute are the actual values.

Relative error

Average relative error is the average of the absolute deviation of the prediction from the actual value divided by the actual value. The values of the label attribute are the actual values.

Relative error lenient

Average lenient relative error is the average of the absolute deviation of the prediction from the actual value divided by the maximum of the actual value and the prediction. The values of the label attribute are the actual values.

Relative error strict

Average strict relative error is the average of the absolute deviation of the prediction from the actual value divided by the minimum of the actual value and the prediction. The values of the label attribute are the actual values.

Normalized absolute error

The absolute error divided by the error made if the average would have been predicted.

Root mean squared error

The averaged root-mean-squared error.

Root relative squared error

The averaged root-relative-squared error.

Squared error

The averaged squared error.

Correlation

Returns the correlation coefficient between the label and prediction attributes.

Squared correlation

Returns the squared correlation coefficient between the label and prediction attributes.

Cross entropy

The cross-entropy of a classifier, defined as the sum over the logarithms of the true label's confidences divided by the number of examples.

Margin

The margin of a classifier, defined as the minimal confidence for the correct label.

Soft margin loss

The average soft margin loss of a classifier, defined as the average of all 1 - confidences for the correct label

Logistic loss

The logistic loss of a classifier, defined as the average of ln(1+exp(-[conf(CC)])) where 'conf(CC)' is the confidence of the correct class.

Skip undefined labels

If set to true, examples with undefined labels are skipped.

Comparator class

This is an expert parameter. The fully qualified classname of the PerformanceComparator implementation is specified here.

Use example weights

This parameter allows example weights to be used for statistical performance calculations if possible. This parameter has no effect if no attribute has weight role. In order to consider weights of examples the ExampleSet should have an attribute with weight role. Several operators are available that assign weights e.g. Generate Weights operator. Study the <reference key="operator.set_roles"> Set Roles </reference>operator for more information regarding weight role.

Class weights

This is an expert parameter. It specifies the weights 'w' for all classes. The Edit List button opens a new window with two columns. The first column specifies the class name and the second column specifies the weight for that class. If the weight of a class is not specified, that class is assigned **weight = 1. **