<jupyter_start><jupyter_text>java install instructions:  https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-on-ubuntu-18-04or   https://www.oracle.com/java/technologies/javase-jdk14-downloads.htmlAutoML Code Examples:  https://docs.h2o.ai/h2o/latest-stable/h2o-docs/automl.htmlcode-examples<jupyter_code>import pandas as pd
import numpy as np
import h2o
from h2o.automl import H2OAutoML
ORD = pd.read_csv('../data/ORD.csv', index_col='Unnamed: 0')
ORD_train = ORD[ORD['year'] < 2018]
def lag_df(df, lag, cols):
    return df.assign(**{f"{col}-{n}": df[col].shift(n) for n in range(1, lag + 1) for col in cols})
lag = 3
ORD_train_lag = lag_df(ORD_train, lag=lag, cols=['seats'])
ORD_train_lag
ORD_train_lag.to_csv('../data/train_data.csv')
h2o.init()
train = h2o.import_file('../data/train_data.csv')
x = train.columns
y = "rides"
x.remove(y)
aml = H2OAutoML(max_models=20, seed=1)
aml.train(x=x, y=y, training_frame=train)
lb = aml.leaderboard
lb.head(rows=lb.nrows)
model_ids = list(aml.leaderboard['model_id'].as_data_frame().iloc[:,0])
model_ids
m = h2o.get_model([mid for mid in model_ids if "GBM_4" in mid][0])  
m
model_ids
model = h2o.get_model(model_ids[3])
model_ids[15]
import os
h2o.save_model(model=h2o.get_model(model_ids[2]), path=os.getcwd()+"/../data/models", force=True)
h2o.save_model(model=h2o.get_model(model_ids[7]), path=os.getcwd()+"/../data/models", force=True)
h2o.save_model(model=h2o.get_model(model_ids[15]), path=os.getcwd()+"/../data/models", force=True)
h2o.save_model(model=h2o.get_model(model_ids[16]), path=os.getcwd()+"/../data/models", force=True)
h2o.save_model(model=h2o.get_model(model_ids[20]), path=os.getcwd()+"/../data/models", force=True)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.18746405980448533, 'fraction_numerical': 0.029902242668200116, 'mean_word_length': 6.219917012448133, 'pattern_counts': {'":': 1, '<': 6, '<?xml version=': 0, '>': 5, 'https://': 3, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '84188', 'license': 'MIT', 'n_tokens_mistral': 763, 'n_tokens_neox': 736, 'n_words': 105, 'path': 'src/auto_ml.ipynb', 'repo_name': 'jsleslie/Ohare_taxi_demand', 'size': '1739'}