I am working on cost sensitive learning on unbalanced datasets. I wanted to try it with the C50cost in R. But there are always examples for binary classification in the documentation. I want to experiment on a dataset with four classes. How can I define a cost matrix for this? I'm grateful for any help. In my second question, I could not find exactly which cost sensitive learning algorithms in R. Mostly the algorithms in phyton are mentioned.
I couldn't test it because I couldn't understand how the cost matrix was created in multiclassification.