Closed
Description
Hi
After loading model for binary classification we are trying to get submodel and calibrator
but if you see after loading model we write below code
((Microsoft.ML.Calibrators.CalibratedModelParametersBase)((Microsoft.ML.Data.PredictionTransformerBase<Microsoft.ML.IPredictorProducing<float>>)((Microsoft.ML.Data.TransformerChain<Microsoft.ML.ITransformer>)mlModel).LastTransformer).Model).SubModel
but failed to getting sub model which is required for us for
LinearBinaryModelParameters
if you see in CreateModel method we easily get SubModel by writing below code
LinearBinaryModelParameters linearBinaryModelParameters = ((Microsoft.ML.Data.TransformerChain<Microsoft.ML.Data.BinaryPredictionTransformer<Microsoft.ML.Calibrators.CalibratedModelParametersBase<Microsoft.ML.Trainers.LinearBinaryModelParameters, Microsoft.ML.Calibrators.PlattCalibrator>>>)mlModel).LastTransformer.Model.SubModel;
but same code if we writer after loading model the we got exception of casting
please guide us.
Metadata
Metadata
Assignees
Labels
No labels