-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Scrubbing OneVsAll #2743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scrubbing OneVsAll #2743
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2743 +/- ##
==========================================
- Coverage 71.67% 71.67% -0.01%
==========================================
Files 809 809
Lines 142416 142416
Branches 16120 16120
==========================================
- Hits 102077 102073 -4
- Misses 35909 35911 +2
- Partials 4430 4432 +2
|
This doesn't look very good to me but my assignment for fixing that is postponed. #Resolved |
@@ -20,7 +20,7 @@ public abstract class MetaMulticlassTrainer<TTransformer, TModel> : ITrainerEsti | |||
where TTransformer : ISingleFeaturePredictionTransformer<TModel> | |||
where TModel : class | |||
{ | |||
public abstract class OptionsBase | |||
internal abstract class OptionsBase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we internalize an Options
of a trainer? #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is internal because the only class that derives from it, Options for pkpd and ova are both internal.
The option classes are internal because there are no advanced options and all of the arguments are exposed in the argument-based constructor.
In reply to: 261015420 [](ancestors = 261015420)
/// </summary> | ||
/// <param name="env">The <see cref="IHostEnvironment"/> instance.</param> | ||
/// <param name="binaryEstimator">An instance of a binary <see cref="ITrainerEstimator{TTransformer, TPredictor}"/> used as the base trainer.</param> | ||
/// <param name="calibrator">The calibrator. If a calibrator is not explicitely provided, it will default to <see cref="PlattCalibratorTrainer"/></param> | ||
/// <param name="calibrator">The calibrator. If a calibrator is not provided, it will default to <see cref="PlattCalibratorTrainer"/></param> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does a naturally-calibrated model (say, logistic regression) interact with this parameter? #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I think it would be worth updating this comment once I have more info. I won't that block checking this in for now though.
In reply to: 261430492 [](ancestors = 261430492,261015949)
/// <param name="labelColumn">The name of the label colum.</param> | ||
/// <param name="imputeMissingLabelsAsNegative">Whether to treat missing labels as having negative labels, instead of keeping them missing.</param> | ||
/// <param name="imputeMissingLabelsAsNegative">If true will treat missing labels as negative labels.</param> | ||
/// <param name="maxCalibrationExamples">Number of instances to train the calibrator.</param> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// <param name="maxCalibrationExamples">Number of instances to train the calibrator.</param> | |
/// <param name="maximumCalibrationExampleCount">Number of instances to train the calibrator.</param> |
What's the indent scope of this PR? Inferred from its title, I assume that having better argument names is included. Please correct me if I am wrong. #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// <param name="maxCalibrationExamples">Number of instances to train the calibrator.</param> | ||
/// <param name="useProbabilities">Use probabilities (vs. raw outputs) to identify top-score category.</param> | ||
internal Ova(IHostEnvironment env, | ||
internal OneVersusAllTrainer(IHostEnvironment env, | ||
TScalarTrainer binaryEstimator, | ||
string labelColumn = DefaultColumnNames.Label, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
string labelColumn = DefaultColumnNames.Label, | |
string labelColumnName = DefaultColumnNames.Label, | |
``` #Resolved |
/// </summary> | ||
/// <param name="env">The <see cref="IHostEnvironment"/> instance.</param> | ||
/// <param name="binaryEstimator">An instance of a binary <see cref="ITrainerEstimator{TTransformer, TPredictor}"/> used as the base trainer.</param> | ||
/// <param name="calibrator">The calibrator. If a calibrator is not explicitely provided, it will default to <see cref="PlattCalibratorTrainer"/></param> | ||
/// <param name="calibrator">The calibrator. If a calibrator is not provided, it will default to <see cref="PlattCalibratorTrainer"/></param> | ||
/// <param name="labelColumn">The name of the label colum.</param> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// <param name="labelColumn">The name of the label colum.</param> | |
/// <param name="labelColumnName">The name of the label colum.</param> | |
``` #Resolved |
@@ -50,7 +50,7 @@ namespace Microsoft.ML.Trainers | |||
/// logistic regression is a more principled way to solve a multiclass problem, it | |||
/// requires that the learner store a lot more intermediate state in the form of | |||
/// L-BFGS history for all classes *simultaneously*, rather than just one-by-one | |||
/// as would be needed for OVA. | |||
/// as would be needed for OneVersusAll. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OneVersusAll [](start = 31, length = 12)
Please use see cref=
if you mean a class or just one-versus-all classification model otherwise. #Resolved
@@ -49,7 +49,7 @@ public sealed class Ova : MetaMulticlassTrainer<MulticlassPredictionTransformer< | |||
private readonly Options _options; | |||
|
|||
/// <summary> | |||
/// Options passed to OVA. | |||
/// Options passed to OneVsAll. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do see cref=
here. #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM. Btw, instead of min
/max
we use minimum
/maximum
in argument names.
build/Dependencies.props
Outdated
@@ -15,7 +15,7 @@ | |||
<GoogleProtobufPackageVersion>3.5.1</GoogleProtobufPackageVersion> | |||
<LightGBMPackageVersion>2.2.3</LightGBMPackageVersion> | |||
<MicrosoftMLOnnxRuntimePackageVersion>0.2.1</MicrosoftMLOnnxRuntimePackageVersion> | |||
<MlNetMklDepsPackageVersion>0.0.0.7</MlNetMklDepsPackageVersion> | |||
<MlNetMklDepsPackageVersion>0.0.0.8</MlNetMklDepsPackageVersion> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ugh! I merged a branch. Will revert these changes..
- Renamed OVA to OneVersusAllTrainer - Renames to abbreviated arguments - Updates to comments and documentation Related to dotnet#2619
Related to Scrubbing Meta learners #2619