<jupyter_start><jupyter_text>catboost<jupyter_code>regr = cat.CatBoostRegressor()

model = regr.load_model("catboost.cbm")
score_test = model.predict(x_test)
# remove decimals
df_sub["count"] = np.round(score_test, 0)

# remove eventual negative
condition = df_sub["count"] < 0

df_sub.loc[condition, "count"] = 0
FILE_SUB_PREFIX = "cat-opt-002"
FILE_SUB = FILE_SUB_PREFIX + ".csv"

df_sub.to_csv(FILE_SUB, index=False)
!kaggle competitions submit -c "bike-sharing-demand" -f $FILE_SUB -m "cat opt 002"<jupyter_output>100%|████████████████████████████████████████| 162k/162k [00:02<00:00, 70.0kB/s]
Successfully submitted to Bike Sharing Demand<jupyter_text>XGBoost<jupyter_code>%%time

# best_params = {'learning_rate': 0.0004394857413078558, 'max_depth': 9, 'n_estimators': 5000}

# model = xgb.XGBRegressor(**best_params)

# model.fit(x_train, y_train)
model = xgb.XGBRegressor()
model.load_model(fname="xgboost.txt")
score_test = model.predict(x_test)
# remove decimals
df_sub["count"] = np.round(score_test, 0)

# remove eventual negative
condition = df_sub["count"] < 0

df_sub.loc[condition, "count"] = 0
FILE_SUB_PREFIX = "xgb-opt-006"
FILE_SUB = FILE_SUB_PREFIX + ".csv"

df_sub.to_csv(FILE_SUB, index=False)
!kaggle competitions submit -c "bike-sharing-demand" -f $FILE_SUB -m "xgb opt 006"<jupyter_output>100%|████████████████████████████████████████| 162k/162k [00:02<00:00, 74.4kB/s]
Successfully submitted to Bike Sharing Demand