benhamner / Metrics

Machine learning evaluation metrics, implemented in Python, R, Haskell, and MATLAB / Octave
Other
1.63k stars 454 forks source link

Update metrics. R #13

Open theiling opened 9 years ago

theiling commented 9 years ago

Corrected rare case, where metrics fails and gives "NaN".. Happens in case of perfect match and both expected.mat and confusion.mat only have one nonzero entry. (Example where the metric fails: rater.a = c(2, 2, 2, 2, 2, 2) rater.b = c(2, 2, 2, 2, 2, 2)) Help by Stephen McInerney in Kaggle forum