Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error using h2o.randomForest #15

Closed
tressoldi opened this issue Feb 24, 2017 · 1 comment
Closed

Error using h2o.randomForest #15

tressoldi opened this issue Feb 24, 2017 · 1 comment

Comments

@tressoldi
Copy link

tressoldi commented Feb 24, 2017

With this syntax:

data=h2o.uploadFile("RIC2Simone.csv", header = TRUE,sep=";",
destination_frame = "data")
data[,1] = as.factor(data[,1])

splits <- h2o.splitFrame(data = data,
ratios = c(0.50, 0.25), #partition data into 50%, 25%, 25% chunks
seed = 1) #setting a seed will guarantee reproducibility
train <- h2o.assign(splits[[1]], "train.hex")
valid <- h2o.assign(splits[[2]], "valid.hex")
test <- h2o.assign(splits[[3]],"test.hex")

response <- "Stimolo"

predictors<-setdiff(names(data),response)

m1 <- h2o.deeplearning(
model_id="dl_model_first",
training_frame=train,
validation_frame=valid,
x=predictors,
y=response,
hidden=c(32,32,32),
epochs=1000000,
score_validation_samples=10000,
stopping_rounds=2,
stopping_metric="misclassification",
stopping_tolerance=0.01,
nfolds=5,
fold_assignment="Stratified",
variable_importances=T
)

I got the following error message:

Illegal argument(s) for DRF model: DRF_model_R_1487947076967_1. Details: ERRR on field: _train: Training data must have at least 2 features (incl. response).

@ledell
Copy link
Contributor

ledell commented Mar 3, 2017

This is not the right place to file bug reports for H2O. This repository is for issues related to h2o-tutorials only. Please post to h2ostream or StackOverflow. That being said, it looks like H2O seems to think that you only have one column in your training data, so you should double check that your predictors and response variables are valid and that your data object was imported correctly.

@ledell ledell closed this as completed Mar 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants