FullExpression / confusion-matrix-stats

🚀This library aims to facilitate the calculations of several metrics using a multi-dimensional confusion matrix. 📚 Provides a set of features, not only to obtain metrics such as accuracy, precision and f1Score, but also matrix normalization, cloning, and the number of predictions.
MIT License
5 stars 0 forks source link

Make all "set" method return the ConfusionMatrix object with changes #2

Closed RicardoGomesRocha closed 3 years ago

RicardoGomesRocha commented 3 years ago

Make all "set" methods return the ConfusionMatrix object with changes. The returned object will be always a clone of the current.

This will enable to do things like:

const transposedConfusionMatrix = oldConfusionMetrix.transpose();
const transposedAndNormalizeConfusionMatrix = transposedConfusionMatrix .normalize(0,1);

const newConfusionMatrix = confusionMatrix.transpose().normalize(0,1);

This will improve code readability and mantainability

RicardoGomesRocha commented 3 years ago

Duplicate of #1. The issue will be closed