How can I use fitcdiscr using my own covariance matrix?

1 回表示 (過去 30 日間)
Johannes
Johannes 2018 年 1 月 25 日
コメント済み: Johannes 2018 年 2 月 1 日
Hi, I want to train a classifier using my own covariance matrix and/or use data that are already whitened (using a covariance matrix that was estimated from more data than the data that are fed into the classifier). However, I do not see any option to supply a covariance matrix to fitcsdiscr. Is there a way to do this? There is a function called makecdiscr that allows one to supply a covariance matrix, but this seems to create a classifier without fitting/training? Or is the outcome of makecdiscr the same as that of fitcsdiscr, just based on different inputs?

採用された回答

Bernhard Suhm
Bernhard Suhm 2018 年 2 月 1 日
The training of fitcdiscr is to estimate the covariance matrix. If you have the covariance matrix, makecdiscr can be used to generate a discriminant analysis classifier. The output is somewhat different (only what we call a "compact" model from makecdiscr), because the original data is not passed to makediscr. The output of the fit functions includes a reference to the training data.
  1 件のコメント
Johannes
Johannes 2018 年 2 月 1 日
Ah OK, silly me! So in short, makecdiscr can produce a very similar classifier as fitcdiscr provided that the supplied covariance matrix is similar to the one that would otherwise be estimated by fitcsdiscr. Clear answer, thanks.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDiscriminant Analysis についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by