I am new to statistics and data mining. I followed the example here, which worked perfect. Now I want to apply this method to my dataset which, however, consists of categorical data only.
R gives the following error:
Error in train.default(x, y, "nb", trControl = trainControl(method = "cv", :
wrong model type for regression
My question is: what sort of transformations should I make in order to apply that method on my categorical set of data?
CODE SNIPPET
bbb <- data.frame(x=c("Cleveland", "London", "London", "Ashburn"),y= c("USA", "GBR", "GBR", "USA"))
x = bbb$x
y = bbb$y
model = train(x,y,'nb',trControl=trainControl(method='cv',number=1))
model