Skip to content

Commit

Permalink
Documentation for classification metrics improved (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
gyrdym committed Sep 18, 2020
1 parent 4127052 commit 219faa5
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,8 @@
# Changelog

## 15.2.4
- Documentation for classification metrics improved

## 15.2.3
- Documentation for RMSE metric improved

Expand Down
66 changes: 61 additions & 5 deletions lib/src/metric/metric_type.dart
@@ -1,5 +1,7 @@
/// Metrics for measuring the quality of the prediction.
enum MetricType {
///
///
/// Mean percentage absolute error (MAPE), a regression metric. The formula
/// is:
///
Expand All @@ -17,6 +19,8 @@ enum MetricType {
/// can produce scores which are greater than 1.
mape,

///
///
/// Root mean squared error (RMSE), a regression metric. The formula is:
///
///
Expand All @@ -31,17 +35,69 @@ enum MetricType {
/// scores within the range [0, +Infinity]
rmse,

/// A classification metric. The greater the score produced by the metric, the
/// better the prediction's quality is. The metric produces scores within the
/// range [0, 1]
///
///
/// A classification metric. The formula is
///
///
/// ![{\mbox{Score}}=\frac{k}{n}](https://latex.codecogs.com/gif.latex?%7B%5Cmbox%7BScore%7D%7D%3D%5Cfrac%7Bk%7D%7Bn%7D)
///
///
/// 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]
accuracy,

/// A classification metric. The greater the score produced by the metric, the
///
///
/// A classification metric. The formula for a single-class problem is
///
///
/// ![{\mbox{Score}}=\frac{TP}{TP + FP}](https://latex.codecogs.com/gif.latex?%7B%5Cmbox%7BScore%7D%7D%3D%5Cfrac%7BTP%7D%7BTP%20+%20FP%7D)
///
///
/// 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}](https://latex.codecogs.com/gif.latex?%7B%5Cmbox%7BScore%7D%7D%3D%20%5Cfrac%7B1%7D%7Bn%7D%5Csum_%7Bt%3D1%7D%5E%7Bn%7DScore_%7Bt%7D)
///
/// 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]
precision,

/// A classification metric. The greater the score produced by the metric, the
///
///
/// A classification metric. The formula for a single-class problem is
///
///
/// ![{\mbox{Score}}=\frac{TP}{TP + FN}](https://latex.codecogs.com/gif.latex?%7B%5Cmbox%7BScore%7D%7D%3D%5Cfrac%7BTP%7D%7BTP%20+%20FN%7D)
///
///
/// 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}](https://latex.codecogs.com/gif.latex?%7B%5Cmbox%7BScore%7D%7D%3D%20%5Cfrac%7B1%7D%7Bn%7D%5Csum_%7Bt%3D1%7D%5E%7Bn%7DScore_%7Bt%7D)
///
///
/// 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,
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.3
version: 15.2.4
homepage: https://github.com/gyrdym/ml_algo

environment:
Expand Down

0 comments on commit 219faa5

Please sign in to comment.