Cs2*_*s20 3 r machine-learning h2o xgboost
我尝试使用 Windows 操作系统在本地计算机上运行 xgboost。但出现以下错误:
Error in .h2o.doSafeREST(h2oRestApiVersion = h2oRestApiVersion, urlSuffix = page, :
ERROR MESSAGE:
java.lang.AssertionError: Unregistered algorithm xgboost
Run Code Online (Sandbox Code Playgroud)
这是我的代码示例:
library(h2o)
h2o.init(enable_assertions = TRUE)
localH2O=h2o.init(nthreads = 8)
train.h2o <- h2o.importFile("train.csv")
test.h2o <- h2o.importFile("test.csv")
# Number of CV folds (to generate level-one data for stacking)
nfolds <- 5
y <- get_index(train.h2o,"loss")
x <- setdiff(1:length(train.h2o), y)
x=h2o.colnames(train.h2o[,x])
y=h2o.colnames(train.h2o[,y])
my_xgb1 <- h2o.xgboost(x = x,
y = y,
training_frame = train.h2o,
ntrees = 50,
max_depth = 3,
min_rows = 2,
learn_rate = 0.2,
nfolds = nfolds,
fold_assignment = "Modulo",
keep_cross_validation_predictions = TRUE,
seed = 1)
Run Code Online (Sandbox Code Playgroud)
当我运行它时,出现以下错误:
错误:意外的 HTTP 状态代码:500 服务器错误(url = http://localhost:54321/3/ModelBuilders/xgboost)
java.lang.AssertionError [1] "java.lang.AssertionError: Unregistered algorithm xgboost"
[2] " hex.ModelBuilder.make(ModelBuilder.java:149)"
[3] "
water.api.ModelBuildersHandler.fetch(ModelBuildersHandler.爪哇:35)”
[4] " sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)"....
我在这里发现 xgboost for h2o 适用于某些特定的开发环境。
我的问题是:我怎样才能让它在 Windows 操作系统上工作?
谢谢你。