Fix confusion matrix using only predictions as source for labels
Fix confusing matrix incorrectly using labels from predict only instead of using labels from predict and ground truth. Ideally we should expose the Scikit-like API that passes in all the labels, in case the labels in the test set are not all inclusive (which would be a mistake in train/test partitioning, but can happen).
I'm somewhat confused by the way the API is written because the argument for the confusion_matrix method is called ground_truth, but shouldn't it be the predicted points instead?
Codecov Report
Base: 39.24% // Head: 39.26% // Increases project coverage by +0.02% :tada:
Coverage data is based on head (
3356d42) compared to base (5ebe23c). Patch coverage: 60.00% of modified lines in pull request are covered.
Additional details and impacted files
@@ Coverage Diff @@
## master #249 +/- ##
==========================================
+ Coverage 39.24% 39.26% +0.02%
==========================================
Files 92 92
Lines 6085 6089 +4
==========================================
+ Hits 2388 2391 +3
- Misses 3697 3698 +1
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/dataset/mod.rs | 29.03% <50.00%> (-0.60%) |
:arrow_down: |
| src/metrics_classification.rs | 38.36% <100.00%> (-0.63%) |
:arrow_down: |
| algorithms/linfa-nn/src/linear.rs | 45.16% <0.00%> (-1.72%) |
:arrow_down: |
| src/correlation.rs | 29.57% <0.00%> (-1.41%) |
:arrow_down: |
| algorithms/linfa-svm/src/classification.rs | 46.49% <0.00%> (-0.88%) |
:arrow_down: |
| ...rithms/linfa-trees/src/decision_trees/algorithm.rs | 36.60% <0.00%> (-0.45%) |
:arrow_down: |
| algorithms/linfa-nn/tests/nn.rs | 78.04% <0.00%> (ø) |
|
| algorithms/linfa-linear/src/glm/mod.rs | 52.77% <0.00%> (ø) |
|
| ... and 3 more |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
The argument is ground_truth because self is the predicted points. The point about using labels from both sources still stands though.