Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Predict labels using discriminant analysis classification model

`label = predict(Mdl,X)`

```
[label,score,cost]
= predict(Mdl,X)
```

`[`

also
returns:`label`

,`score`

,`cost`

]
= predict(`Mdl`

,`X`

)

A matrix of classification scores (

`score`

) indicating the likelihood that a label comes from a particular class. For discriminant analysis, scores are posterior probabilities.A matrix of expected classification cost (

`cost`

). For each observation in`X`

, the predicted class label corresponds to the minimum expected classification cost among all classes.

`ClassificationDiscriminant`

| `CompactClassificationDiscriminant`

| `edge`

| `fitcdiscr`

| `loss`

| `margin`