MetricType enum

Metrics for measuring the quality of the prediction.

Inheritance

Constructors

MetricType()
const

Values

mape → const MetricType

Mean percentage absolute error (MAPE), a regression metric. The formula is:

{\mbox{Score}}={\frac{1}{n}}\sum_{{t=1}}^{n}\left|{\frac{y_{t}-\widehat{y}{t}}{y{t}}}\right|

where y - original value, y with hat - predicted one

The less the score produced by the metric, the better the prediction's quality is. Can lead to error if there are zero values among the original values. Normally, the metric produces scores within the range 0, 1 (both included), but extremely high predicted values (>> original values) can produce scores which are greater than 1.

rmse → const MetricType

Root mean squared error (RMSE), a regression metric. The formula is

{\mbox{Score}}=\sqrt{\frac{1}{n}\sum_{{t=1}}^{n}({\widehat{y}{t} - y{t}})^2}

where y is an original value, y with hat - predicted one

The less the score produced by the metric, the better the prediction's quality is. The metric produces scores within the range 0, +Infinity

rss → const MetricType

Residual sum of squares (RSS), a regression metric. The formula is

{\mbox{Score}}=\sum_{t=1}^{n}(y_{t} - \widehat{y}_{t})^{2}

where n is a total amount of labels, y is an original value, y with hat - predicted one

accuracy → const MetricType

A classification metric. The formula is

{\mbox{Score}}=\frac{k}{n}

where k is a number of correctly predicted labels, n - total amount of labels

The greater the score produced by the metric, the better the prediction's quality is. The metric produces scores within the range 0, 1

precision → const MetricType

A classification metric. The formula for a single-class problem is

{\mbox{Score}}=\frac{TP}{TP + FP}

where TP is a number of correctly predicted positive labels (true positive), FP - a number of incorrectly predicted positive labels (false positive). In other words, TP + FP is a number of all the labels predicted to be positive

The formula for a multi-class problem is

{\mbox{Score}}= \frac{1}{n}\sum_{t=1}^{n}Score_{t}

Where Score 1..t are scores for each class from 1 to t

The greater the score produced by the metric, the better the prediction's quality is. The metric produces scores within the range 0, 1

recall → const MetricType

A classification metric. The formula for a single-class problem is

{\mbox{Score}}=\frac{TP}{TP + FN}

where TP is a number of correctly predicted positive labels (true positive), FN - a number of incorrectly predicted negative labels (false negative). In other words, TP + FN is a total amount of positive labels for a class in the given data

The formula for a multi-class problem is

{\mbox{Score}}= \frac{1}{n}\sum_{t=1}^{n}Score_{t}

Where Score 1..t are scores for each class from 1 to t

The greater the score produced by the metric, the better the prediction's quality is. The metric produces scores within the range 0, 1

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<MetricType>
A constant List of the values in this enum, in order of their declaration.