AutoML

Copper Contributor

Hi, I was looking for some answers on training.

 

I like how the AutoML works, especially when the parameters are auto tweaked for a better fit.

 

Is there a way to select a specific algorithm and have the automl iterate over that for X minutes, like the autoML wizard but for a specific algorithm?

 

thank you

1 Reply

Hi @__James__

 

Thanks for your question. We've recently created a series of notebooks going over several getting started and E2E ML scenarios with ML.NET. One of those is on training with AutoML.

I encourage you to check them out.

 

 

There are a few ways to do what you're asking. One is to exclude some algorithms using the experiment API. That's highlighted in this notebook: csharp-notebooks/03-Training and AutoML.ipynb at main · dotnet/csharp-notebooks (github.com) 

 

var pipeline = 
  context.Transforms.Concatenate("Features", "X")
    .Append(context.Auto().Regression("y", useLbfgs: false, useSdca: false, useFastForest: false));

 

The other is to use SweepableEstimators directly and have AutoML search for the hyperparameters. That is highlighted in this notebook: csharp-notebooks/E2E-Forecasting using SSA with Luna Dataset.ipynb at main · dotnet/csharp-notebooks...

 

var pipeline = 
  mlContext.Transforms.CopyColumns("newLoad", "load")
    .Append(mlContext.Auto().CreateSweepableEstimator((context, ss) =>
    {
      return mlContext.Forecasting.ForecastBySsa("predict", "load", ss.WindowSize, ss.SeriesLength, Convert.ToInt32(trainDf.Rows.Count), 1, rank: ss.Rank, variableHorizon: true);
    }, searchSpace));

 

Note that in both of these cases, they're using the preview version of the AutoML API which you can get access to from the daily ML.NET NuGet feed. 

https://pkgs.dev.azure.com/dnceng/public/_packaging/MachineLearning/nuget/v3/index.json