Memuat
Memuat
Support Vector Machine for Tourism and Hospitality
0 views
Classify tourism village development level from number of attractions and distance to city with a Support Vector Machine and compare kernel choices. A Support Vector Machine finds the separating hyperplane with the largest margin, and kernels allow nonlinear decision boundaries. It suits classification with small to medium data and high-dimensional features.

Classify tourism village development level from number of attractions and distance to city with a Support Vector Machine and compare kernel choices.
| Role | Variable | Unit |
|---|---|---|
| Main | tourism village development level | - |
| Supporting 1 | number of attractions | buah |
| Supporting 2 | distance to city | km |
The RBF-kernel SVM model classifies tourism village development l… (low/high) from number of attractions and distance to city with test accuracy 0.956, F1 0.957 and AUC 0.970. It uses 32 support vectors.
Computed from illustrative synthetic data, not from a real study.
A Support Vector Machine finds the separating hyperplane with the largest margin, and kernels allow nonlinear decision boundaries. It suits classification with small to medium data and high-dimensional features.
Report the kernel, best parameters, test metrics, and the number of support vectors. Explain that the model is a black box, so feature interpretation is limited.
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.svm import SVC
from sklearn.preprocessing import StandardScaler
from sklearn.pipeline import make_pipeline
from sklearn.model_selection import GridSearchCV, train_test_split
from sklearn.metrics import accuracy_score, f1_score
rng = np.random.default_rng(41)
n = 300
number_of_attractions = rng.normal(0, 1, n)
distance_to_city = rng.normal(0, 1, n)
tourism_village_development_ = ((number_of_attractions ** 2 + distance_to_city ** 2) > 1.2).astype(int)
X = np.column_stack([number_of_attractions, distance_to_city])
X_tr, X_te, y_tr, y_te = train_test_split(X, tourism_village_development_, test_size=0.25, stratify=tourism_village_development_, random_state=41)
pipe = make_pipeline(StandardScaler(), SVC(kernel="rbf"))
grid = {"svc__C": [0.1, 1, 10, 100], "svc__gamma": [0.01, 0.1, 1]}
gs = GridSearchCV(pipe, grid, cv=5).fit(X_tr, y_tr)
pred = gs.predict(X_te)
print("Best params:", gs.best_params_)
print("Accuracy:", round(accuracy_score(y_te, pred), 3), "F1:", round(f1_score(y_te, pred), 3))
print("Support vectors:", gs.best_estimator_[-1].n_support_)
gx, gy = np.meshgrid(np.linspace(-3, 3, 200), np.linspace(-3, 3, 200))
zz = gs.predict(np.c_[gx.ravel(), gy.ravel()]).reshape(gx.shape)
plt.contourf(gx, gy, zz, alpha=0.3)
plt.scatter(X_te[:, 0], X_te[:, 1], c=y_te, edgecolor="k")
plt.xlabel("x1"); plt.ylabel("x2")
plt.show()Choose how much help you need. Each higher package includes everything in the lower ones. Prices exclude 11% VAT.
Package 1
US$25
excl. 11% VAT
Duration: 5 working days
Output: Python files + result figures
Deliverables
Package 2 · most chosen
US$72
excl. 11% VAT
Duration: 9 working days
Output: Code + analysis + interpretation notes
Includes all of Package 1, plus
Package 3
US$159
excl. 11% VAT
Duration: 14-17 working days
Output: Code + analysis + guidance until ready to present
Includes all of Packages 1 & 2, plus
Yes. Support Vector Machine 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$25, Package 2 (your data analysis and interpretation) US$72 and Package 3 (full guidance) US$159, 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