Skip to content

Add FieldAwareFactorizationMachine to AutoML #3985

Open

Description

@justinormont

FieldAwareFactorizationMachine is good for large dataset like the Criteo 1TB dataset.

Currently FieldAwareFactorizationMachine is not swept over in AutoML.

Task:

  • Add trainer to default list of binary learners to try
  • Add sweep range
  • Add to CLI's C# CodeGen

Should be easy to just replicate an existing trainer like SDCA:

internal class SdcaLogisticRegressionBinaryExtension : ITrainerExtension
{
public IEnumerable<SweepableParam> GetHyperparamSweepRanges()
{
return SweepableParams.BuildSdcaParams();
}
public ITrainerEstimator CreateInstance(MLContext mlContext, IEnumerable<SweepableParam> sweepParams,
ColumnInformation columnInfo)
{
var options = TrainerExtensionUtil.CreateOptions<SdcaLogisticRegressionBinaryTrainer.Options>(sweepParams, columnInfo.LabelColumnName);
return mlContext.BinaryClassification.Trainers.SdcaLogisticRegression(options);
}
public PipelineNode CreatePipelineNode(IEnumerable<SweepableParam> sweepParams, ColumnInformation columnInfo)
{
return TrainerExtensionUtil.BuildPipelineNode(TrainerExtensionCatalog.GetTrainerName(this), sweepParams,
columnInfo.LabelColumnName);
}
}

Activity

  1. zHaytam commented on Aug 25, 2019

    @zHaytam
    Contributor

    Hi, I would like to take this issue if possible.

  2. justinormont commented on Aug 25, 2019

    @justinormont
    ContributorAuthor

    Sounds great.

    This will be a change to the master branch as the AutoML API code has been merged into master. The CLI's CodeGen (which creates the C# project) still lives in the AutoML feature branch.

    Perhaps @XiaroanZhang can create the CodeGen part, or walk you though what's needed. @daholste may also be able to offer advice. I'll be out for the next week, but feel free to submit a PR and have folks approve/merge in.

    Thanks so much.

  3. gokart23 commented on Oct 6, 2019

    @gokart23

    Hi @justinormont, looks like this issue is still open - do you mind if I work on it?

  4. mstfbl commented on Jan 9, 2020

    @mstfbl
    Contributor

    Hi @gokart23 and @zHaytam , if you guys are still interested, go for it!

  5. Sandy4321 commented on Jan 26, 2020

    @Sandy4321
  6. justinormont commented on May 10, 2021

    @justinormont
    ContributorAuthor

    Related: #590

    The related issue will allow FieldAwareFactorizationMachine to also be added to the multi-class AutoML task. Currently FieldAwareFactorizationMachine is only for binary classification due to not implementing the needed interfaces for OVA (one-vs-all / one-vs-rest).


    @Sandy4321 : No one has run that specific set of benchmarks, which sweep over the training dataset size and records {AUC, log-loss, training time, max memory, cpu load}. I would be very interested in seeing the results if someone would like to run it against various ML․NET trainers.

    I have run the Criteo 1TB dataset extensively within ML․NET. Beyond the single trainers, it does run successfully in the AutoML code as all steps in the process are resilient to datasets well beyond memory size. Streamable trainers will succeed on small machines, and other memory bound trainers should also succeed on very large memory machines.

    Disabling caching and non-streamable trainers will help small machines succeed for the full Criteo 1TB dataset. Subsampling to reduce the training dataset size, as the benchmark shows, is the other main route to reduce memory usage.

  7. added
    Priority:2Work that is important, but not critical for the release
    area-AutoMLAutomated machine learning, Model Builder, and ML.NET CLI
    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

Labels

Priority:2Work that is important, but not critical for the releasearea-AutoMLAutomated machine learning, Model Builder, and ML.NET CLIgood first issueGood for newcomersin-prA pull request is open to resolve this issueyellowmaintenance only

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions