Skip to content
Prev 347764 / 398500 Next

Asymmetric Cost assignment for SVM | Help

Hi Friends,

I want to assign asymmetric cost values at the time training.

For example : For false negative cost should be 10 and for For false
positive it should be 1.

Can some help me with this.


Code:

svmFit <- train(Y ~ .,
                data = train,
                method = "svmRadial",
                preProc = c("center", "scale"),
                cost=5,
                trControl = trainControl(method = "repeatedcv", repeats =
5,classProbs =  TRUE))


So I need a way to force cost of 10 for false negative and 1 for false
positive at time of training.

Regards,
Bharat