Sorry for the dumb question. I'm running the following code:
gbm_mdl <- do.call(train,
c(list(x=L0FeatureSet1$train$predictors,y=L0FeatureSet1$train$y),
CARET.TRAIN.PARMS,
MODEL.SPECIFIC.PARMS,
CARET.TRAIN.OTHER.PARMS))
Predictor has a bunch of independent variables and y is the target. I get the following error:
Error in gbm.fit(x = list(Neighborhood = c(17L, 17L, 17L, 17L, 17L, 17L, :
variable 1: Neighborhood is not of type numeric, ordered, or factor.
However, if I test for "Neighborhood" in my predictors, it's a factor:
is.factor(L0FeatureSet1$train $predictors$Neighborhood[1])
[1] TRUE
class(L0FeatureSet1$train $predictors$Neighborhood)
[1] "factor"
I'm also running a xgboost and ranger model with the same list of parameters and it works for both of those.
Does anyone know how I should proceed to fix this? Thanks