@@ -0,0 +1,895 @@
+from tgboost import TGBoost%0Aimport pandas as pd%0A%0Atrain = pd.read_csv('train.csv')%0Atrain = train.sample(frac=1.0, axis=0)  # shuffle the data%0Aval = train.iloc%5B0:5000%5D%0Atrain = train.iloc%5B5000:%5D%0A%0A%0Atrain_y = train.label%0Atrain_X = train.drop('label', axis=1)%0Aval_y = val.label%0Aval_X = val.drop('label', axis=1)%0A%0A%0Aparams = %7B'loss': %22squareloss%22,%0A          'eta': 0.3,%0A          'max_depth': 6,%0A          'num_boost_round': 500,%0A          'scale_pos_weight': 1.0,%0A          'subsample': 0.7,%0A          'colsample_bytree': 0.7,%0A          'colsample_bylevel': 1.0,%0A          'min_sample_split': 10,%0A          'min_child_weight': 2,%0A          'reg_lambda': 10,%0A          'gamma': 0,%0A          'eval_metric': %22mae%22, # %22mse%22%0A          'early_stopping_rounds': 20,%0A          'maximize': False,%0A          'num_thread': 16%7D%0A%0A%0Atgb = TGBoost()%0Atgb.fit(train_X, train_y, validation_data=(val_X, val_y), **params)%0A

add a regression task example