-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Allow only binary classifiers in OVA #2949
Conversation
@@ -628,7 +628,7 @@ private static ICalibratorTrainer GetCalibratorTrainerOrThrow(IExceptionContext | |||
/// <param name="useProbabilities">Use probabilities (vs. raw outputs) to identify top-score category.</param> | |||
/// <typeparam name="TModel">The type of the model. This type parameter will usually be inferred automatically from <paramref name="binaryEstimator"/>.</typeparam> | |||
public static OneVersusAllTrainer OneVersusAll<TModel>(this MulticlassClassificationCatalog.MulticlassClassificationTrainers catalog, | |||
ITrainerEstimator<ISingleFeaturePredictionTransformer<TModel>, TModel> binaryEstimator, | |||
ITrainerEstimator<BinaryPredictionTransformer<TModel>, TModel> binaryEstimator, |
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.
BinaryPredictionTransformer [](start = 30, length = 27)
Might not be so easy because any given BinaryPredictionTransformer
might not be an ISingleFeaturePredictionTransformer
; from what I understand, OVA
is currently limited to learners with single feature vectors (e.g. not FieldAwareFactorizationMachines
). #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.
Here is the definition for BinaryPredictionTransformer:
/// <summary>
/// Base class for the <see cref="ISingleFeaturePredictionTransformer{TModel}"/> working on binary classification tasks.
/// </summary>
/// <typeparam name="TModel">An implementation of the <see cref="IPredictorProducing{TResult}"/></typeparam>
public sealed class BinaryPredictionTransformer<TModel> : SingleFeaturePredictionTransformerBase<TModel>
so it looks like its a base transformer class for all ISingleFeaturePredictionTransformer and thats exactly what we need.
In reply to: 265408746 [](ancestors = 265408746)
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.
Thanks @ganik! This should help prevent people from feeding in the "wrong" types of models I hope.
Broken build ! I'm fixing. |
fixes #2920