【发布时间】:2016-07-25 20:23:46
【问题描述】:
H2O 深度学习默认运行回归,即使我已确保目标变量是一个因素(只有两个水平)。有关如何解决此问题的任何线索?
下面是代码:
dnn_mod <-
h2o.deeplearning(x = 2:321, # column numbers for predictors
y = 322, # column number for label
training_frame = sdcs_data, # data in H2O format
activation = "TanhWithDropout", # or 'Tanh'
input_dropout_ratio = 0.2, # % of inputs dropout
hidden_dropout_ratios = c(0.3,0.3,0.3), # % for nodes dropout
balance_classes = FALSE,
hidden = c(150,150,150),
epochs = 500,
#standardize = TRUE,
epsilon = 1.0e-5,
loss = "CrossEntropy",
stopping_rounds = 50,
stopping_metric = "AUC")
#classification = TRUE)
【问题讨论】:
-
“正在运行回归”是什么意思?
-
默认运行回归模型而不是分类。 CrosseEntropy 损失等参数在这种情况下没有意义并引发错误。
-
所以不要设置 loss="CrossEntropy"....
-
我认为这不是重点。问题不是错误,而是 H2O 没有运行分类。
-
一些数据和一些代码会很好,又名reproducible example
标签: r machine-learning h2o