Main Content

Construct discriminant analysis classifier from parameters

constructs
a compact classifier with additional options specified by one or more
name-value pair arguments. For example, you can specify the cost of
misclassification or the prior probabilities for each class.`cobj`

= makecdiscr(`Mu`

,`Sigma`

,`Name,Value`

)

You can change the discriminant type using dot notation after constructing

`cobj`

:cobj.DiscrimType = '

*discrimType*'where

is one of`discrimType`

`'linear'`

,`'quadratic'`

,`'diagLinear'`

,`'diagQuadratic'`

,`'pseudoLinear'`

, or`'pseudoQuadratic'`

. You can change between linear types or between quadratic types, but cannot change between a linear and a quadratic type.`cobj`

is a linear classifier when`Sigma`

is a matrix.`cobj`

is a quadratic classifier when`Sigma`

is a three-dimensional array.

`compact`

| `CompactClassificationDiscriminant`

| `fitcdiscr`

| `predict`