Scoring methods (scoring
)¶
CA¶
- Orange.evaluation.CA(results=None, **kwargs)[source]¶
A wrapper for sklearn.metrics._classification.accuracy_score. The following is its documentation:
Accuracy classification score.
In multilabel classification, this function computes subset accuracy: the set of labels predicted for a sample must exactly match the corresponding set of labels in y_true.
Read more in the User Guide.
Precision¶
- Orange.evaluation.Precision(results=None, **kwargs)[source]¶
A wrapper for sklearn.metrics._classification.precision_score. The following is its documentation:
Compute the precision.
The precision is the ratio
tp / (tp + fp)
wheretp
is the number of true positives andfp
the number of false positives. The precision is intuitively the ability of the classifier not to label as positive a sample that is negative.The best value is 1 and the worst value is 0.
Read more in the User Guide.
Recall¶
- Orange.evaluation.Recall(results=None, **kwargs)[source]¶
A wrapper for sklearn.metrics._classification.recall_score. The following is its documentation:
Compute the recall.
The recall is the ratio
tp / (tp + fn)
wheretp
is the number of true positives andfn
the number of false negatives. The recall is intuitively the ability of the classifier to find all the positive samples.The best value is 1 and the worst value is 0.
Read more in the User Guide.
F1¶
- Orange.evaluation.F1(results=None, **kwargs)[source]¶
A wrapper for sklearn.metrics._classification.f1_score. The following is its documentation:
Compute the F1 score, also known as balanced F-score or F-measure.
The F1 score can be interpreted as a harmonic mean of the precision and recall, where an F1 score reaches its best value at 1 and worst score at 0. The relative contribution of precision and recall to the F1 score are equal. The formula for the F1 score is:
F1 = 2 * (precision * recall) / (precision + recall)
In the multi-class and multi-label case, this is the average of the F1 score of each class with weighting depending on the
average
parameter.Read more in the User Guide.
PrecisionRecallFSupport¶
- Orange.evaluation.PrecisionRecallFSupport(results=None, **kwargs)[source]¶
A wrapper for sklearn.metrics._classification.precision_recall_fscore_support. The following is its documentation:
Compute precision, recall, F-measure and support for each class.
The precision is the ratio
tp / (tp + fp)
wheretp
is the number of true positives andfp
the number of false positives. The precision is intuitively the ability of the classifier not to label a negative sample as positive.The recall is the ratio
tp / (tp + fn)
wheretp
is the number of true positives andfn
the number of false negatives. The recall is intuitively the ability of the classifier to find all the positive samples.The F-beta score can be interpreted as a weighted harmonic mean of the precision and recall, where an F-beta score reaches its best value at 1 and worst score at 0.
The F-beta score weights recall more than precision by a factor of
beta
.beta == 1.0
means recall and precision are equally important.The support is the number of occurrences of each class in
y_true
.If
pos_label is None
and in binary classification, this function returns the average precision, recall and F-measure ifaverage
is one of'micro'
,'macro'
,'weighted'
or'samples'
.Read more in the User Guide.
AUC¶
Log Loss¶
- Orange.evaluation.LogLoss(results=None, **kwargs)[source]¶
${sklpar}
- Parameters
results (Orange.evaluation.Results) -- Stored predictions and actual data in model testing.
eps (float) -- Log loss is undefined for p=0 or p=1, so probabilities are clipped to max(eps, min(1 - eps, p)).
normalize (bool, optional (default=True)) -- If true, return the mean loss per sample. Otherwise, return the sum of the per-sample losses.
sample_weight (array-like of shape = [n_samples], optional) -- Sample weights.
Examples
>>> Orange.evaluation.LogLoss(results) array([ 0.3...])
MSE¶
MAE¶
R2¶
- Orange.evaluation.R2(results=None, **kwargs)[source]¶
A wrapper for sklearn.metrics._regression.r2_score. The following is its documentation:
\(R^2\) (coefficient of determination) regression score function.
Best possible score is 1.0 and it can be negative (because the model can be arbitrarily worse). In the general case when the true y is non-constant, a constant model that always predicts the average y disregarding the input features would get a \(R^2\) score of 0.0.
In the particular case when
y_true
is constant, the \(R^2\) score is not finite: it is eitherNaN
(perfect predictions) or-Inf
(imperfect predictions). To prevent such non-finite numbers to pollute higher-level experiments such as a grid search cross-validation, by default these cases are replaced with 1.0 (perfect predictions) or 0.0 (imperfect predictions) respectively. You can setforce_finite
toFalse
to prevent this fix from happening.Note: when the prediction residuals have zero mean, the \(R^2\) score is identical to the
Explained Variance score
.Read more in the User Guide.