Skip to content

Instantly share code, notes, and snippets.

View mxaviersmp's full-sized avatar

Matheus Xavier Sampaio mxaviersmp

View GitHub Profile
@regispires
regispires / h2o_utils.py
Last active November 9, 2021 03:21
Utility functions to work with the h2o machine learning framework
import h2o
def h2o_train(model, X_train, y_train, X_val=None, y_val=None):
print('h2o_train - training...')
X_y_train = np.c_[ X_train, y_train ]
frame_train = h2o.H2OFrame(X_y_train)
if X_val is not None and y_val is not None:
X_y_val = np.c_[ X_val, y_val ]
frame_val = h2o.H2OFrame(X_y_val)