Example #1
0
def RPtrainer(**params):
    import h2o
    h2o.init()
    try:
        model = h2o.H2OFakeGameEstimator(model_config=fg.rProp(**params))
        model_name = "Fakegame - RProp"
        trainTime = dt.now()
        model.train(x=x_cols,
                    y=y_col,
                    training_frame=trdata,
                    validation_frame=vadata)
        initTime = dt.now() - optStart
        trainTime = dt.now() - trainTime
        mse = model.mse(valid=True)
        benchmark(model, model_name, params, initTime, trainTime)
        return mse
    except:
        print("Error in {} with params {}".format(model_name, str(params)))
        return 10e15
Example #2
0
def RPtrainer(x_cols, y_col, trdata, vadata, **params):
    model = h2o.H2OFakeGameEstimator(model_config=fg.rProp(**params))
    model.train(x=x_cols,y=y_col, training_frame=trdata, validation_frame=vadata)
    return model.mse(valid=True)