在h2o上运行网格搜索以进行深度学习时出现断言错误

时间:2016-11-28 16:53:44

标签: r neural-network deep-learning h2o grid-search

当我尝试使用我的数据集运行教程代码时,我得到了一个java.lang.AssertionError。你可以告诉我哪里出错了以及如何纠正它?

response <- "Churn"
predictors <- setdiff(names(churn), response)

hyper_params <- list(
  hidden=list(c(32,32,32),c(64,64)),
  input_dropout_ratio=c(0,0.05),
  rate=c(0.01,0.02),
  rate_annealing=c(1e-8,1e-7,1e-6)
)
grid <- h2o.grid(
  algorithm="deeplearning",
  grid_id="dl_grid", 
  training_frame=churn_training,
  validation_frame=churn_validation, 
  x=predictors, 
  y=response,
  epochs=1,
  stopping_metric="AUTO",     ## Changed this to AUTO for classification
  stopping_tolerance=1e-2,       
  stopping_rounds=2,
  score_validation_samples=10000, 
  score_duty_cycle=0.025,         
  adaptive_rate=F,                
  momentum_start=0.5,             
  momentum_stable=0.9, 
  momentum_ramp=1e7, 
  l1=1e-5,
  l2=1e-5,
  activation=c("Rectifier"),
  max_w2=10,                      
  hyper_params=hyper_params
)

编辑:这是数据的快照。它原来也有偏见

https://github.com/sujaydsa/sample_data/blob/master/ex.csv

1 个答案:

答案 0 :(得分:0)

我也遇到了类似的问题,即数据没有缺失值等。看来对我有用的解决方法是在初始化enable_assertions = FALSE时设置h2o

h2o.init(nthreads = ..., enable_assertions = FALSE)