Cannot combine OneVersusAll with FieldAwareFactorizationMachine
The following:
OneVersusAll.With(new FieldAwareFactorizationMachineBinaryClassifier(), false);
throws a Predictor doesn't implement the expected interface. How could I combine the two?
Thanks for reporting, @rauhs. We should update The FieldAwareFactorizationMachineBinaryClassifier to implement the IValueMapper interface.
Any update on this?
No. This is still an outstanding issue. How important is it for you @rauhs ?
I guess not all that important after all. I just wanted to try it out.
FieldAwareFactorizationMachine doesn't implement the correct interface. Neither of the casts below work, which means OVA cannot use FAF.
var mlContext = new MLContext();
var faf = mlContext.BinaryClassification.Trainers.FieldAwareFactorizationMachine(new[] { "Features" });
var invalidCast = faf as
ITrainerEstimator<
ISingleFeaturePredictionTransformer<IPredictorProducing<float>>,
IPredictorProducing<float>>;
var invalidCast2 = faf as
ITrainerEstimator<
IPredictionTransformer<IPredictorProducing<float>>,
IPredictorProducing<float>>;
var ova = mlContext.MulticlassClassification.Trainers.OneVersusAll(faf);
Before changing OVA to take IPredictionTransformer instead of ISingleFeaturePredictionTransformer, FAF needs further work to implement one of the interfaces above. @sfilipi / @Ivanidzo4ka do you know how to do it? FAF interface looks different than other BinaryClassifiers (say Sdca):

After spending some time on this, I realized that FAF is the only binary trainer with multiple feature columns (string[] featureColumns), whereas other trainers have only one feature column. This is making FAF an odd trainer that doesn't fit the existing interfaces. We'd need to adjust all the trainer interfaces to accommodate this case. This won't be a trivial fix.
Given that @rauhs thinks this is not an important scenario, I'm putting this item in the backlog to be visited later.
Notable: FieldAwareFactorizationMachine is the only of our binary learners which doesn't work with OVA.
@wschin What is the status on this?
Unassigning @wschin as he is on other topics.