Documentation Center |
E = edge(mdl,X,Y)
E = edge(mdl,X,Y,Name,Value)
E = edge(mdl,X,Y) returns the classification edge for mdl with data X and classification Y.
E = edge(mdl,X,Y,Name,Value) computes the edge with additional options specified by one or more Name,Value pair arguments.
E |
Classification edge, a scalar that is the mean classification margin (see Margin). |
The edge is the mean value of the classification margin.
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 X.
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.
ClassificationKNN | fitcknn | loss | margin