I’ll try to be as concise as possible. This is a student project, an application in ASP.NET that monitors data and forecasts it. I then tried to integrate Microsoft ML AutoML with no progress. I can’t figure out from the documentation what’s wrong, and Chat-GPT can’t help.
I’ll remove unnecessary parts. Here’s the model code where records are converted:
public class FRToDataView
{
[ColumnName("Label")]
public float Label { get; set; }
[ColumnName("DateTime")]
public DateTime DateTime { get; set; }
}
Machine learning code
public void BuildModel(IEnumerable<FloatRecord> trainingData)
{
var dataView = context.Data.LoadFromEnumerable(trainingData.Select(x => new FRToDataView(x)));
var experimentSettings = new RegressionExperimentSettings
{
MaxExperimentTimeInSeconds = 60,
OptimizingMetric = RegressionMetric.RSquared,
};
// Initialize the AutoML experiment
var experiment = context.Auto().CreateRegressionExperiment(experimentSettings);
// Train the AutoML model
var result = experiment.Execute(dataView);
// Get the best model
var bestRun = result.BestRun;
_model = bestRun.Model;
}
Error code
System.NullReferenceException : Object reference not set to an instance of an object.
Call stack
SweepablePipeline.ctor(Dictionary`2 estimators, Entity schema, String currentSchema)
SweepablePipeline.AppendEntity(Boolean allowSkip, Entity entity)
RegressionExperiment.CreateRegressionPipeline(IDataView trainData, ColumnInformation columnInformation, IEstimator`1 preFeaturizer)
RegressionExperiment.Execute(IDataView trainData, ColumnInformation columnInformation, IEstimator`1 preFeaturizer, IProgress`1 progressHandler)
RegressionExperiment.Execute(IDataView trainData, String labelColumnName, String samplingKeyColumn, IEstimator`1 preFeaturizer, IProgress`1 progressHandler)
AutoMLModel.BuildModel(IEnumerable`1 trainingData)`
I add machine learning in a hurry and in a hurry I can poorly understand the nuances of working with the library, I’m sorry if I made some stupid mistake
Centerhades is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.