我试图用h2o deeplearning模型预测出租车时间:
deep<-h2o.deeplearning(
training_frame = train,
validation_frame = valid,
x=predictors,
y=target,
#distribution = "gaussian",
#loss = "Automatic",
#hidden=c(30,30),
epochs = 50,
#activation="Rectifier",
stopping_metric="deviance",
stopping_tolerance=1e-5, # stops when deviance does
not improve by >=0.0001 for 5 scoring events
stopping_rounds=5
)
这是输入变量的样子,TAXI_OUT是目标,它在几分钟内,当然总是> 0:
DAY_OF_WEEK CARRIER ORIGIN DEST TAXI_OUT congestion sin_deptime cos_deptime dep_blk_sin dep_blk_cos Temp Dew_point
18 1 DL ATL PHL 32 53 -0.80644460 0.5913096 -0.3246995 0.9458172 11 12
24 1 DL ATL EWR 23 75 -0.40673664 0.9135455 0.8371665 0.5469482 11 12
25 1 DL ATL EWR 24 55 0.68199836 -0.7313537 0.4759474 -0.8794738 11 12
30 1 DL ATL FLL 35 52 -0.04361939 -0.9990482 -0.7357239 -0.6772816 11 12
32 1 DL ATL PBI 30 68 -0.78260816 -0.6225146 -0.9694003 0.2454855 11 12
36 1 DL ATL DTW 13 50 -0.68835458 0.7253744 0.6142127 0.7891405 11 12
Humidity Sea_Level_Press Visibility Wind Event_1 Event_2 Event_3
18 99 1019 2 11 Fog Rain Thunderstorm
24 99 1019 2 11 Fog Rain Thunderstorm
25 99 1019 2 11 Fog Rain Thunderstorm
30 99 1019 2 11 Fog Rain Thunderstorm
32 99 1019 2 11 Fog Rain Thunderstorm
36 99 1019 2 11 Fog Rain Thunderstorm
我是否需要重新调整某个范围内的数字输入变量,例如[0,1]或[-1,1],还是让h2o处理它们?
答案 0 :(得分:0)
H2O自动处理缩放。你不需要做任何事情。