SVM: Does specifying a prior change the cost matrix?
I have an unbalanced data set (1:5). In the documentation, it states:
"If you specify a cost matrix, then the software updates the prior probabilities by incorporating the penalties described in the cost matrix for training."
Does this also work in reverse – i.e. does specifying a prior change the cost matrix? If not, why not? Can you specify both at the same time?
If it does update the cost matrix, then is it correct to leave the prior as the default of "empirical" (which means matched to the training data) and expect it to update the cost matrix accordingly? I guess this will depend on whether I expect the test data (and real world data) to have a 1:5 ratio, right? If I want to to be just as good at classifying one class as the other, should I just specify priors of 0.5 for each of the two classes, or do I need to change the cost matrix too?
Thanks.I have an unbalanced data set (1:5). In the documentation, it states:
"If you specify a cost matrix, then the software updates the prior probabilities by incorporating the penalties described in the cost matrix for training."
Does this also work in reverse – i.e. does specifying a prior change the cost matrix? If not, why not? Can you specify both at the same time?
If it does update the cost matrix, then is it correct to leave the prior as the default of "empirical" (which means matched to the training data) and expect it to update the cost matrix accordingly? I guess this will depend on whether I expect the test data (and real world data) to have a 1:5 ratio, right? If I want to to be just as good at classifying one class as the other, should I just specify priors of 0.5 for each of the two classes, or do I need to change the cost matrix too?
Thanks. I have an unbalanced data set (1:5). In the documentation, it states:
"If you specify a cost matrix, then the software updates the prior probabilities by incorporating the penalties described in the cost matrix for training."
Does this also work in reverse – i.e. does specifying a prior change the cost matrix? If not, why not? Can you specify both at the same time?
If it does update the cost matrix, then is it correct to leave the prior as the default of "empirical" (which means matched to the training data) and expect it to update the cost matrix accordingly? I guess this will depend on whether I expect the test data (and real world data) to have a 1:5 ratio, right? If I want to to be just as good at classifying one class as the other, should I just specify priors of 0.5 for each of the two classes, or do I need to change the cost matrix too?
Thanks. svm, fitcsvm, prior, cost matrix, unbalanced MATLAB Answers — New Questions