dotnet / dotnet/machinelearning-samples
AutoML - how to read values of L1Regularization and L2Regularization and selected algorithm name?
- Lingua principale
- PowerShell
- Stelle
- 4.7k
- Fork
- 2.7k
- Merge medio
- 2g 22h
- PR unite (30g)
- 1
Descrizione
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.
```
public static IEstimator 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 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
```
model as TransformerChain>
model as TransformerChain>
model as TransformerChain>
```
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia con la pipeline generata MyModel.training.cs e con l’AutoML TrialResult restituito da experiment.RunAsync(). Confronta i tipi di modello utilizzati dalla pipeline LightGBM generata con le indicazioni per l’estrazione e i cast elencati. Il lavoro è completato quando viene determinato come leggere i valori dell’algoritmo selezionato, L1Regularization e L2Regularization, oppure viene documentato che non possono essere ottenuti dal modello restituito.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- csharp, machine-learning
- Ambito
- machine-learning
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 30/100