Open jgiemza opened 4 years ago
Hello,
I can't run predict function on my current data.
blockfor_cv <- blockfor(data_tr_cv, y_tr_cv, num.trees = 2000, replace = FALSE, probability = FALSE, blocks=blocks, nsets = 300, num.trees.pre = 1500, splitrule="extratrees", importance = "impurity", block.method = "BlockForest", num.threads=10, always.select.block=0)
testpred <- predict(blockfor_cv$forest, data=data_te_cv, block.method=BlockForest, num.threads=10)
gives error:Error in[.data.frame(data, , forest$independent.variable.names, drop = FALSE) : undefined columns selected
Error in
(data, , forest$independent.variable.names, drop = FALSE) : undefined columns selected
Colnames of data_tr_cv are the same as in data_te_cv.
I have looked at your code and I guess the error corresponds to line 128 in predict.R. My response is binary. It should not be there I guess because I don't specify data as a formula.
I would be glad if you could help me.
Could you give a reproducible example? I cannot reproduce your issue.
Hello,
I can't run predict function on my current data.
blockfor_cv <- blockfor(data_tr_cv, y_tr_cv, num.trees = 2000, replace = FALSE, probability = FALSE, blocks=blocks, nsets = 300, num.trees.pre = 1500, splitrule="extratrees", importance = "impurity", block.method = "BlockForest", num.threads=10, always.select.block=0)
testpred <- predict(blockfor_cv$forest, data=data_te_cv, block.method=BlockForest, num.threads=10)
gives error:
Error in
[.data.frame(data, , forest$independent.variable.names, drop = FALSE) : undefined columns selected
Colnames of data_tr_cv are the same as in data_te_cv.
I have looked at your code and I guess the error corresponds to line 128 in predict.R. My response is binary. It should not be there I guess because I don't specify data as a formula.
I would be glad if you could help me.