def lightmodel(x_train, x_test, y_train, y_test, reg, seed = 1234):
        try: import lightgbm as lgb
        except: print("Cannot install"); raise
        x_train = array(x_train); y_train = array(y_train); x_test = array(x_test); y_test = array(y_test)
        if reg == True:
            model = lgb.LGBMRegressor(objective='regression', num_leaves = 5, learning_rate = 0.1, n_estimators = 100, seed = seed)
            model.fit(x_train, y_train, early_stopping_rounds = 10, eval_metric='l2', eval_set=[(x_test, y_test)],verbose=False)
            return model