-2

This is a general question. Are there classifiers in R -- functions that perform classification implementing classification algorithms-- that accept as input argument the relative cost of misclassification. E.g. if a misclassification of a positive to negative has cost 1 the opposite has cost 3.

If yes which are these functions?

am7
  • 51
  • 6

1 Answers1

1

Yes. If you are using the caret package (you should; it provides 'standardization' for 200+ classification and regression methods by wrapping almost all relevant R's packages), you can set the weights argument of the train function (see p.152; see also here) for models that support class weights. This answer lists some of the models that support class weights.

Lior Kogan
  • 19,919
  • 6
  • 53
  • 85