This repository provides a research-grade implementation of:
- Multiple Linear Regression (MLR)
- Adaptive Neuro-Fuzzy Inference System (ANFIS)
for modeling home-based trip generation as part of the classical four-step travel demand modeling framework.
The work reproduces and extends findings from the peer-reviewed publication:
Irshaid, M., & Abu-Eisheh, S. (2023).
Application of Adaptive Neuro-Fuzzy Inference System in Modelling Home-Based Trip Generation.
Ain Shams Engineering Journal, 14(11), 102523.
https://doi.org/10.1016/j.asej.2023.102523
Trip generation is traditionally modeled using linear statistical methods. However, real-world travel behavior is:
- nonlinear
- uncertain
- influenced by interacting socioeconomic factors
This repository investigates whether ANFIS can better capture behavioral complexity compared to classical regression models.
- Ordinary Least Squares (OLS)
- Stepwise feature selection
- Statistical significance testing
- Multicollinearity diagnostics
- TakagiβSugeno fuzzy inference system
- Gaussian membership functions
- Hybrid learning:
- Least Squares Estimation (forward pass)
- Gradient Descent (backward pass)
Four trip production categories are modeled:
| Code | Description |
|---|---|
| HBALL | Total household trips |
| HBW | Home-based work trips |
| HBE | Home-based education trips |
| HBO | Home-based other trips |
- Location: Salfit City, Palestine
- Source: Household travel survey
- Sample size:
- 256 households (training/calibration)
- 53 households (validation)
Socioeconomic variables include:
- Household size
- Employment status
- Education status
- Vehicle ownership
- Income level
- Household structure
Raw Survey Data
β
Data Cleaning & Preprocessing
β
Feature Engineering
β
Train / Test Split
β
MLR Model Training
ANFIS Model Training
β
Prediction & Evaluation
β
Model Comparison
| Model | Method | RMSE | RΒ² |
|---|---|---|---|
| HBALL | MLR | 1.7112 | 65.85% |
| ANFIS | 1.4880 | 74.18% | |
| HBW | MLR | 0.5932 | 90.36% |
| ANFIS | 0.5465 | 92.74% | |
| HBE | MLR | 0.4035 | 96.63% |
| ANFIS | 0.4020 | 96.66% | |
| HBO | MLR | 1.5778 | 80.65% |
| ANFIS | 1.4419 | 83.94% |
-
ANFIS significantly improves prediction for:
- HBALL (complex aggregated behavior)
- HBO (heterogeneous trip purpose)
-
MLR performs competitively for:
- HBW
- HBE
-
Insight:
Nonlinear AI models are most beneficial when behavioral complexity increases.
home-based-trip-generation-anfis/
β
βββ code/ # Core implementation
β βββ preprocessing.py
β βββ mlr_model.py
β βββ anfis_model.py
β βββ train_mlr.py
β βββ train_anfis.py
β βββ evaluate_models.py
β βββ run_pipeline.py
β
βββ data/ # Dataset + metadata
β βββ salfit_trip_data.csv
β βββ feature_description.md
β
βββ figures/ # Paper figures & diagrams
β
βββ notebooks/ # Exploratory & experimental analysis
β
βββ results/ # Outputs & evaluation logs
β
βββ paper/ # Published article
β
βββ requirements.txt
βββ README.md
git clone https://github.com/Mohammad-irshaid/home-based-trip-generation-anfis.git
cd home-based-trip-generation-anfis
python -m venv venv
source venv/bin/activate # (Linux/Mac)
venv\Scripts\activate # (Windows)
pip install -r requirements.txtpython code/run_pipeline.pypython code/train_mlr.py
python code/train_anfis.pypython code/evaluate_models.pyTo reproduce the published results:
- Load dataset from
/data - Run preprocessing pipeline
- Train MLR and ANFIS models
- Evaluate using RMSE, MAE, RΒ²
- Compare outputs with paper results
- Single-city case study (Salfit)
- Limited sample size
- No cross-city validation
- Static socioeconomic features only
- Deep learning comparison (DNN, LSTM)
- GIS-based accessibility integration
- Transferability across cities
- Explainable AI (SHAP / LIME)
- Mode choice integration
- Activity-based modeling extension
If you use this work, please cite:
@article{irshaid2023anfis,
title={Application of adaptive neuro-fuzzy inference system in modelling home-based trip generation},
author={Irshaid, Mohammad and Abu-Eisheh, Sameer},
journal={Ain Shams Engineering Journal},
volume={14},
pages={102523},
year={2023},
publisher={Elsevier}
}- Department of Civil Engineering, An-Najah National University
- Field survey participants in Salfit City
- Transportation planning research community
This project is licensed under the MIT License.