hello_world.py 549 Bytes
Newer Older
Xu Jitao's avatar
Xu Jitao committed
1
print("hello world")
Tiphagne Thomas's avatar
Tiphagne Thomas committed
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31








import h2o
from h2o.automl import H2OAutoML

h2o.init()

train = h2o.import_file("https://s3.amazonaws.com/erin-data/higgs/higgs_train_10k.csv")
test = h2o.import_file("https://s3.amazonaws.com/erin-data/higgs/higgs_test_5k.csv")

x = train.columns
y = "response"
x.remove(y)

train[y] = train[y].asfactor()
test[y] = test[y].asfactor()

aml = H2OAutoML(max_runtime_secs = 130)
aml.train(x = x, y = y, training_frame = train, leaderboard_frame = test)

print(aml.leaderboard)
print(aml.leader)

print(aml.predict(test))