When I use VS designer to generate model it generates for example file MyModel.training.cs with such code which can be used to re-train model using the same paramters.
public static IEstimator<ITransformer> BuildPipeline(MLContext mlContext)
{
// Data process configuration with pipeline data transformations
var pipeline = mlContext.Transforms.Text.FeaturizeText(inputColumnName:@"col0",outputColumnName:@"col0")
.Append(mlContext.Transforms.Concatenate(@"Features", new []{@"col0"}))
.Append(mlContext.Transforms.Conversion.MapValueToKey(outputColumnName:@"col1",inputColumnName:@"col1",addKeyValueAnnotationsAsText:false))
.Append(mlContext.MulticlassClassification.Trainers.LightGbm(new LightGbmMulticlassTrainer.Options(){NumberOfLeaves=2717,NumberOfIterations=2632,MinimumExampleCountPerLeaf=29,LearningRate=0.0609179057439351,LabelColumnName=@"col1",FeatureColumnName=@"Features",ExampleWeightColumnName=null,Booster=new GradientBooster.Options(){SubsampleFraction=0.999999776672986,FeatureFraction=0.99999999,L1Regularization=1.67496587225263E-09,L2Regularization=0.999999776672986},MaximumBinCountPerFeature=207}))
.Append(mlContext.Transforms.Conversion.MapKeyToValue(outputColumnName:@"PredictedLabel",inputColumnName:@"PredictedLabel"));
return pipeline;
}
If I use AutoML TrialResult experimentResults = await experiment.RunAsync(); I cannot find there name of the algorithm and its params which have been used to generate this mode.
I was trying these casts but every time I see the null value
model as TransformerChain<MulticlassPredictionTransformer<Microsoft.ML.Trainers.MaximumEntropyModelParameters>>
model as TransformerChain<MulticlassPredictionTransformer<Microsoft.ML.Trainers.LinearMulticlassModelParameters>>
model as TransformerChain<MulticlassPredictionTransformer<Microsoft.ML.Trainers.LinearMulticlassModelParametersBase>>
Hi
When I use VS designer to generate model it generates for example file MyModel.training.cs with such code which can be used to re-train model using the same paramters.
If I use AutoML
TrialResult experimentResults = await experiment.RunAsync();
I cannot find there name of the algorithm and its params which have been used to generate this mode.I found this doc https://learn.microsoft.com/en-us/dotnet/machine-learning/how-to-guides/train-machine-learning-model-ml-net#extract-model-parameters but in my case any casting ends with null value.
I was trying these casts but every time I see the null value