Fix for OneVersusAll Multiclass trainer#4698
Merged
kere-nel merged 5 commits intodotnet:masterfrom Jan 28, 2020
Merged
Conversation
harishsk
reviewed
Jan 24, 2020
| Host.Check(Utils.Size(outputs) >= 1); | ||
| string opType = "LinearRegressor"; | ||
| string scoreVarName = (Utils.Size(outputs) == 2) ? outputs[1] : outputs[0]; // Get Score from PredictedLabel and/or Score columns | ||
| string scoreVarName = (Utils.Size(outputs) >= 2) ? outputs[1] : outputs[0]; // Get Score from PredictedLabel and/or Score columns |
Contributor
There was a problem hiding this comment.
What cases result in the output size being greater than 2?
Contributor
Author
There was a problem hiding this comment.
When a calibrator is used, the probability column is added. More specifically, the OVA trainer always creates a probability output column, so the output count will be 3. An alternative would be to distinguish between trainers that need the probability column and those that don't inside OVA, but I think that would be more involved.
Codecov Report
@@ Coverage Diff @@
## master #4698 +/- ##
==========================================
- Coverage 75.84% 75.83% -0.01%
==========================================
Files 951 951
Lines 172594 172613 +19
Branches 18632 18632
==========================================
+ Hits 130896 130904 +8
- Misses 36523 36529 +6
- Partials 5175 5180 +5
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also adding tests for OVA with FastForest, LinearSVM, and AveragedPerceptron.