Perform Naive-Bayes classification(fitcnb) with non-zero off-diagonal covariance matrix
2 ビュー (過去 30 日間)
古いコメントを表示
Greetings,
I use a Bayesian classification model to generate class-conditional probability density functions (PDFs) from a Monte Carlo (MC) simulation (see Fig 1). The different classes have inter-variable correlations such that the covariance matrix has non-zeros on the off-diagonal elements. However, the Bayesian classification model seems to assume that the off-diagonal elements are zero, such that the PDFs for each class are not shaped according to the MC simulated data (see Fig 2); this makes the PDFs look like ellipsoids that are horizontally aligned.
So, how can I specify the covariance elements in the Bayesian classification model when I for instance want to use it to predict a new data set?
Thanks,
Kenneth
Fig 1:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/169122/image.jpeg)
Fig2:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/169123/image.jpeg)
0 件のコメント
採用された回答
the cyclist
2018 年 1 月 18 日
編集済み: the cyclist
2018 年 1 月 18 日
Disclaimer: I am not an expert on these methods.
Doesn't the "naive" in naive Bayes specifically mean that the model features are independent from each other (i.e. uncorrelated)? You might need a more sophisticated model.
その他の回答 (1 件)
Ilya
2018 年 1 月 19 日
To estimate covariance per class, use fitcdiscr with discriminant type 'quadratic'.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Naive Bayes についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!