Memuat
Memuat
Gradient Boosting Regression for Tourism and Hospitality
0 views
Build a Gradient Boosting model to predict spending per tourist from service waiting time and menu variety and compare prediction errors. Gradient boosting regression builds trees sequentially, each correcting the errors of the previous ones. It is used when high predictive accuracy on tabular data is needed and there is time to tune hyperparameters.

Build a Gradient Boosting model to predict spending per tourist from service waiting time and menu variety and compare prediction errors.
| Role | Variable | Unit |
|---|---|---|
| Main | spending per tourist | Rp ribu |
| Supporting 1 | service waiting time | menit |
| Supporting 2 | menu variety | item |
Gradient boosting reaches a test R2 of 0.763 for spending per tourist (RMSE 18.585); the test error is lowest at iteration 66.
Computed from illustrative synthetic data, not from a real study.
Gradient boosting regression builds trees sequentially, each correcting the errors of the previous ones. It is used when high predictive accuracy on tabular data is needed and there is time to tune hyperparameters.
Report the final hyperparameters, test R2 and RMSE, and the per-iteration error curve to show the stopping point. Compare with random forest or linear regression as baselines.
A short starting script with this project's variable names. The delivered version is adapted to your data and fully commented.
import numpy as np
import matplotlib.pyplot as plt
from sklearn.ensemble import GradientBoostingRegressor
from sklearn.model_selection import train_test_split
from sklearn.metrics import r2_score, mean_squared_error
rng = np.random.default_rng(3)
n = 500
service_waiting_time = rng.uniform(-3, 3, n)
menu_variety = rng.normal(size=n)
spending_per_tourist = service_waiting_time ** 2 + 2 * menu_variety + rng.normal(0, 0.5, n)
X = np.column_stack([service_waiting_time, menu_variety])
X_tr, X_te, y_tr, y_te = train_test_split(X, spending_per_tourist, test_size=0.25, random_state=3)
gb = GradientBoostingRegressor(n_estimators=400, learning_rate=0.05, max_depth=3,
subsample=0.8, random_state=3)
gb.fit(X_tr, y_tr)
pred = gb.predict(X_te)
print("Test R2:", round(r2_score(y_te, pred), 3))
print("Test RMSE:", round(mean_squared_error(y_te, pred) ** 0.5, 3))
print("Importance:", gb.feature_importances_.round(3))
tr_err = [mean_squared_error(y_tr, p) for p in gb.staged_predict(X_tr)]
te_err = [mean_squared_error(y_te, p) for p in gb.staged_predict(X_te)]
plt.plot(tr_err, label="Train MSE")
plt.plot(te_err, label="Test MSE")
plt.xlabel("Boosting iteration"); plt.ylabel("MSE"); plt.legend()
plt.show()Choose how much help you need. Each higher package includes everything in the lower ones. Prices exclude 11% VAT.
Package 1
US$31
excl. 11% VAT
Duration: 7 working days
Output: Python files + result figures
Deliverables
Package 2 · most chosen
US$88
excl. 11% VAT
Duration: 13 working days
Output: Code + analysis + interpretation notes
Includes all of Package 1, plus
Package 3
US$194
excl. 11% VAT
Duration: 18-21 working days
Output: Code + analysis + guidance until ready to present
Includes all of Packages 1 & 2, plus
Yes. Gradient Boosting Regression is commonly used at this level in Tourism and Hospitality. We adapt the analysis to your research question, your own data and your supervisor's requirements.
No. The sheet is computed from illustrative synthetic data so you can see the kind of output Python gives. For your order we run the same method on your own data.
That is the point of the packages. Every script is commented, and Package 3 includes two coaching sessions plus practice questions so you can explain the method and the results at your seminar and defence.
Each project has three packages: Package 1 (code and explanation) US$31, Package 2 (your data analysis and interpretation) US$88 and Package 3 (full guidance) US$194, excluding 11% VAT. Larger datasets, extra methods or tight deadlines adjust the quote after a short consultation.
The result sheet uses illustrative synthetic data. Python is a trademark of the Python Software Foundation.
Back to Python portfolio