My svm classifier model always predict 0.5 as probabilities.
svm.model <- svm(repeater ~ idRepeatBuyRatio + idTotalPurchase + c + d, data = trainData, cost = 100, gamma = 1)
svm.pred <- predict(svm.model, testData, probability = TRUE)
head(attr(svm.pred, "probabilities"))
t f
1 0.5 0.5
2 0.5 0.5
3 0.5 0.5
4 0.5 0.5
5 0.5 0.5
6 0.5 0.5
which is strange because the same call without probabilities actually makes different classifications:
> svm.pred <- predict(svm.model, testData, probability = FALSE)
> head(svm.pred)
1 2 3 4 5 6
f t f t f f
Levels: f t
Can someone explain what I am doing wrong?