application_vnd.jupyter.stderr_output_2.png application_vnd.jupyter.stderr_output_3.png text_plain_output_1.png
import numpy as np # linear algebra

paths = ['../input/train.csv', '../input/test.csv']
target_name = 'SalePrice'

rd = Reader(sep=',')
df = rd.train_test_split(paths, target_name)

dft = Drift_thresholder()
df = dft.fit_transform(df)

rmse = make_scorer(lambda y_true, y_pred: np.sqrt(np.sum((y_true - y_pred) ** 2) / len(y_true)), greater_is_better=False, needs_proba=False)
opt = Optimiser(scoring=rmse, n_folds=3)

space = {'est__strategy': {'search': 'choice', 'space': ['LightGBM']}, 'est__n_estimators': {'search': 'choice', 'space': [150]}, 'est__colsample_bytree': {'search': 'uniform', 'space': [0.8, 0.95]}, 'est__subsample': {'search': 'uniform', 'space': [0.8, 0.95]}, 'est__max_depth': {'search': 'choice', 'space': [5, 6, 7, 8, 9]}, 'est__learning_rate': {'search': 'choice', 'space': [0.07]}}
params = opt.optimise(space, df, 15)