I simply modified the MATLAB fisheriris example at:
to add "fitSVMPosterior". As you can see in this example the score transform is lost after "loadCompactModel". Is there a reason it does not save the score transform for deployment?
Code example:
load fisheririsinds = ~strcmp(species,'setosa');X = meas(inds,:);Y = species(inds);Mdl = fitcsvm(X,Y);MdlScore=fitSVMPosterior(Mdl);saveCompactModel(MdlScore,'SVMIris');
And then when I do this,
loadCompactModel('SVMIris')
I get the following warning message:
Warning: Unable to restore ScoreTransform property. Call
fitSVMPosterior to fit posterior probabilities.
> In classreg.learning.classif.CompactClassificationSVM.fromStruct (line 296)
In classreg.coderutils.structToModel (line 50)
In loadCompactModel (line 30)
Best Answer