MATLAB: How to check independence assumption for Naive Bayes

classificationnaive bayes

I know that the assumption for the Naive Bayes classifier is that the features are independent, but what if we want to check if that applies to our data? How would we do test it using Matlab?

Best Answer

For a 2-dimensional matrix, if the determinant is zero, then at least two rows or two columns are linearly dependent.
You can also do a principal component analysis in order to know in which direction the variation is significant.