# Tanzania Tourism Spending Prediction
Machine learning project for predicting tourist expenditure in Tanzania.
## Overview
This repository contains a notebook-based regression workflow for estimating `total_cost`, the amount a tourist is expected to spend when visiting Tanzania. The project uses historical tourism survey data and evaluates models with Mean Absolute Error (MAE).
## Project Goal
The objective is to build a model that predicts tourist spending based on traveler demographics, trip purpose, travel arrangement, package features, nights stayed, and payment behavior.
## Repository Contents
- `Tanzania_Tourism_Spending_Prediction.ipynb` - main analysis and modeling notebook
- `Train.csv` - training dataset with the target variable `total_cost`
- `Test.csv` - test dataset for generating predictions
- `SampleSubmission.csv` - submission format example
- `VariableDefinitions.csv` - descriptions of the dataset columns
- `submission.csv` - generated prediction file
- `submission_ensemble.csv` - alternate ensemble submission file
## Dataset Summary
The dataset includes fields such as:
- Traveler demographics: `country`, `age_group`, `travel_with`, `total_female`, `total_male`
- Trip details: `purpose`, `main_activity`, `infor_source`, `tour_arrangment`
- Package features: `package_transport_int`, `package_accomodation`, `package_food`, `package_transport_tz`, `package_sightseeing`, `package_guided_tour`, `package_insurance`
- Stay and payment information: `night_mainland`, `night_zanzibar`, `payment_mode`, `first_trip_tz`, `most_impressing`
## Modeling Workflow
The notebook follows a typical end-to-end regression pipeline:
1. Load and inspect the training and test data.
2. Clean and preprocess categorical and numeric features.
3. Encode categorical variables and prepare the feature matrix.
4. Train and compare multiple regression models.
5. Tune selected models with cross-validation / grid search.
6. Generate final predictions for the test set.
7. Sa …