Documentation |
m = resubMargin(mdl)
m = resubMargin(mdl) returns the classification margins of the data used to train mdl. For the definition, see Margin.
m |
A numeric column vector of length size(mdl.X,1), where mdl.X is the training data for mdl. Each entry in m represents the margin for the corresponding row of mdl.X and (true class) mdl.Y. |
The classification margin is the difference between the classification score for the true class and maximal classification score for the false classes.
Margin is a column vector with the same number of rows as in the training data.
The score of a classification is the posterior probability of the classification. The posterior probability is the number of neighbors that have that classification, divided by the number of neighbors. For a more detailed definition that includes weights and prior probabilities, see Posterior Probability.