World's Best AI Learning Platform with profoundly Demanding Certification Programs
Designed by IITians, only for AI Learners.
Designed by IITians, only for AI Learners.
New to InsideAIML? Create an account
Employer? Create an account
Download our e-book of Introduction To Python
4.5 (1,292 Ratings)
559 Learners
Pallavi Parekh
a year ago
import h2o
from h2o.automl import H2OAutoML
h2o.init()
data = h2o.import_file('iris.csv')
features = ['sepal_length', 'sepal_width', 'petal_length', 'petal_width']
output = 'class'
train, test = data.split_frame(ratios=[0.8])
aml = H2OAutoML(max_models = 30, max_runtime_secs=300, seed = 1)
aml.train(x = features, y = output, training_frame = train)
lb = aml.leaderboard
lb.head()
print (preds)
lb.head(rows = lb.nrows)