Retrain Multiclassification ITransformer

混江龙づ霸主 提交于 2021-01-29 12:38:41

问题


I created a ITransformer model based on the SdcaMaximumEntropy trainer from the MulticlassClassification :

var trainingPipeline = pipeline.Append(mlContext.MulticlassClassification.Trainers.SdcaMaximumEntropy())
                    .Append(mlContext.Transforms.Conversion.MapKeyToValue("PredictedLabel"));
ITransformer trainedModel = trainingPipeline.Fit(splitTrainSet);

Now I want to retrain it with the Fit method by applying the original model parameters :

var originalModelParameters = ((MulticlassPredictionTransformer<object>)model).Model as MaximumEntropyModelParameters;
            model = mlContext.MulticlassClassification.Trainers.SdcaMaximumEntropy().Fit(newData, originalModelParameters);

But I get an error on the Fit method :

No overload for method 'Fit' takes 2 arguments

So I'm aware that the Fit method from the SdcaMaximumEntropy trainer doesn't have the required Fit method with 2 arguments, but I am wondering how can I retrain my multiclassification model without it ?


回答1:


Unfortunately, the SdcaMaximumEntrpy trainer isn't in the list of trainers that can be retrained. Perhaps you can try LbfgsMaximumEntropyMulticlassTrainer instead?

Hopefully, in the future, more trainers will be able to be retrained.



来源:https://stackoverflow.com/questions/60266193/retrain-multiclassification-itransformer

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!