Skip to content

Cannot combine OneVersusAll with FieldAwareFactorizationMachine #590

Open

Description

@rauhs

The following:

OneVersusAll.With(new FieldAwareFactorizationMachineBinaryClassifier(), false);

throws a Predictor doesn't implement the expected interface. How could I combine the two?

Activity

  1. sfilipi commented on Jul 30, 2018

    @sfilipi
    Member

    Thanks for reporting, @rauhs.
    We should update The FieldAwareFactorizationMachineBinaryClassifier to implement the IValueMapper interface.

  2. rauhs commented on Oct 9, 2018

    @rauhs
    ContributorAuthor

    Any update on this?

  3. Zruty0 commented on Nov 5, 2018

    @Zruty0
    Contributor

    No. This is still an outstanding issue. How important is it for you @rauhs ?

  4. rauhs commented on Nov 8, 2018

    @rauhs
    ContributorAuthor

    I guess not all that important after all. I just wanted to try it out.

  5. self-assigned this
    on Nov 29, 2018
  6. shmoradims commented on Nov 29, 2018

    @shmoradims

    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):
    image

  7. shmoradims commented on Nov 30, 2018

    @shmoradims

    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.

  8. removed their assignment
    on Nov 30, 2018
  9. justinormont commented on Dec 4, 2018

    @justinormont
    Contributor

    Notable: FieldAwareFactorizationMachine is the only of our binary learners which doesn't work with OVA.

  10. self-assigned this
    on Apr 9, 2019
  11. codemzs commented on Jun 30, 2019

    @codemzs
    Member

    @wschin What is the status on this?

  12. justinormont commented on May 10, 2021

    @justinormont
    Contributor

    Unassigning @wschin as he is on other topics.

  13. added
    Priority:1Work that is critical for the release, but we could probably ship without
    area-RecommenderRecommendation and matrix factorisation
    help wanted[up-for-grabs] Good issue for external contributors
    and removed on Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority:1Work that is critical for the release, but we could probably ship withoutarea-RecommenderRecommendation and matrix factorisationbugSomething isn't workingenhancementNew feature or requestgreendevelopmenthelp wanted[up-for-grabs] Good issue for external contributorsyellowmaintenance only

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions