I am training an ensemble of classification trees, and I want to specify a unique cost matrix because there are unequal classification costs.
I ran the 'fitcensemble' function with the 'Cost' name value pair argument. I set the cost matrix to [0 50; 5 0]. However, when I look at my resulting ensemble model returned by this function, the 'Cost' field has reverted to the default matrix [0 1; 1 0]. Why is this?
Best Answer