Hi users!

I am fitting a model with several factor variables as independents using
svm. since there are lots of categorical variables,the training and test
data sets have been created using dummy.data.frame option from dummies
package. I have a factor A in the training data set with 2 levels (0,1).In
the test set, this factor A has only 1 level (1) and hence when applying
dummy.data.frame, the variable gets dropped(and that's how i want it too).
The problem comes when I am trying to predict the test data as an error is
thrown saying A0 object is not found. Is there anyway  to solve this
problem?

Thanks
Divya

--
View this message in context: 
http://r.789695.n4.nabble.com/handling-constant-factors-in-prediction-using-svm-tp3870093p3870093.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to