Hello,
I am trying to calculate the error rate using crossval with normal Bayes classifiers, ldc and qdc, with a cost function, but I keep getting errors when I try and add in the cost function. I thought it would be similar to Listing 9.2 with scalem, so I tried
ldc_cost = ldc*costm([],costf’);
err_ldc_cost = crossval(z,ldc_cost,500);
but it did not work because it said the classifier cannot be trained.
How can I add in a cost function and still use crossval?
Thanks in advance,
Thomas

