Skip to content

Commit

Permalink
Metrics: documentation for MAPE metric extended
Browse files Browse the repository at this point in the history
  • Loading branch information
gyrdym committed Sep 14, 2020
1 parent acf96b4 commit 92293c3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,8 @@
# Changelog

## 15.2.2
- Documentation for MAPE metrics improved

## 15.2.1
- `classificationMetrics` constant list added
- `regressionMetrics` constant list added
Expand Down
20 changes: 14 additions & 6 deletions lib/src/metric/metric_type.dart
@@ -1,11 +1,19 @@
/// Metrics for measuring the quality of the prediction.
enum MetricType {
/// Mean percentage absolute error (MAPE), a regression metric. 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], but extremely high
/// predicted values (>> original values) can produce scores which are
/// greater than 1.
/// 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|](https://latex.codecogs.com/gif.latex?%7B%5Cmbox%7BScore%7D%7D%3D%7B%5Cfrac%7B1%7D%7Bn%7D%7D%5Csum_%7B%7Bt%3D1%7D%7D%5E%7Bn%7D%5Cleft%7C%7B%5Cfrac%7BY_%7Bt%7D-%5Cwidehat%7BY%7D_%7Bt%7D%7D%7BY_%7Bt%7D%7D%7D%5Cright%7C)
///
///
/// 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.
mape,

/// Root mean squared error, a regression metric. The less the score produced
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
@@ -1,6 +1,6 @@
name: ml_algo
description: Machine learning algorithms, Machine learning models performance evaluation functionality
version: 15.2.1
version: 15.2.2
homepage: https://github.com/gyrdym/ml_algo

environment:
Expand Down

0 comments on commit 92293c3

Please sign in to comment.