Note: This page has been translated by MathWorks. Please click here

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

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

Construct discriminant analysis classifier from parameters

`cobj = makecdiscr(Mu,Sigma)`

`cobj = makecdiscr(Mu,Sigma,Name,Value)`

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.

`CompactClassificationDiscriminant`

| `compact`

| `fitcdiscr`

| `predict`

Was this topic helpful?