How is the output from a trained model to be understood?

1 vue (au cours des 30 derniers jours)
Betzalel Fialkoff
Betzalel Fialkoff le 25 Mar 2018
So I trained a logistic regression model, using the Classification Learner app, after training I exported using the generate code option, at this point I have the model in my workspace as a struct. My code is as follows:
%feature extraction
features=ReadData();
%train the model
logitReg=trainingModel(features);
%to predict create a feature vector and call the predictFcn method of the
%model
featureVector=[0 0.01 0.1 1 2];%A random feature vector to test the function
[a b]=logitReg.predictFcn( featureVector);
My problem is simply that I dont know how to understand the output. As far as I can tell the variable a is the model's prediction, b is a 2x1 double, the sum of its 2 terms is equal to one. In this case:
b=[0.0239 0.9761];
this leads me to believe that b(1) is the probability that the feature belongs to class '0' and b(2) is the probability that the feature belongs to class '1'. However I cannot find ny documentation to confirm this.
Can anyone help? Greatly appreciated!

Réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by