Classification error
L = loss(obj,X,Y)
L = loss(obj,X,Y,Name,Value)
returns the classification loss, which
is a scalar representing how well L
= loss(obj
,X
,Y
)obj
classifies the data in
X
, when Y
contains the true
classifications.
When computing the loss, loss
normalizes the class
probabilities in Y
to the class probabilities used for training,
stored in the Prior
property of obj
.
returns the loss with additional options specified by one or more
L
= loss(obj
,X
,Y
,Name,Value
)Name,Value
pair arguments.
|
Discriminant analysis classifier of class |
|
Matrix where each row represents an observation, and each column
represents a predictor. The number of columns in |
|
Class labels, with the same data type as exists in |
Specify optional
comma-separated pairs of Name,Value
arguments. Name
is
the argument name and Value
is the corresponding value.
Name
must appear inside quotes. You can specify several name and value
pair arguments in any order as
Name1,Value1,...,NameN,ValueN
.
|
Built-in, loss-function name (character vector or string scalar in the table) or function handle.
For more details on loss functions, see Classification Loss. Default: | ||||||||||||||||
|
Numeric vector of length Default: |
|
Classification
loss, a scalar. The interpretation of |
ClassificationDiscriminant
| edge
| fitcdiscr
| margin
| predict