This machine learning project predicts whether an airline passenger is Satisfied or Not Satisfied based on in-flight experience and service metrics. It includes an interactive Gradio app where users can enter details and get real-time satisfaction predictions.
To apply multiple supervised learning algorithms and build a reliable model that can predict customer satisfaction using airline service data.
-
Data Preprocessing:
- Dropped irrelevant columns (
id,Unnamed: 0) - Encoded categorical variables using
LabelEncoder - Scaled numerical features using
StandardScaler
- Dropped irrelevant columns (
-
Model Training:
- Tested multiple classifiers:
LogisticRegression,DecisionTreeClassifier,RandomForestClassifier,
GradientBoostingClassifier,KNeighborsClassifier,SVC - Selected the best-performing model based on accuracy score
- Tested multiple classifiers:
-
Deployment:
- Built a Gradio interface to accept user input and return prediction
- Used
pickleto save/load the trained model
- Demographics:
Gender,Age,Customer Type - Flight Experience:
Class,Type of Travel,Flight Distance - Services Rated:
Inflight Wifi,Food and Drink,Online Boarding,Seat Comfort,
Entertainment,Cleanliness,Check-in Service,Leg Room Service, etc.
- Time Delays:
Departure Delay,Arrival Delay
- Pie chart for satisfaction distribution
- Bar plots for average flight distance by class
- Heatmap of model confusion matrix for classification evaluation
📸 Screenshots
- Logistic Regression
- Decision Tree
- Random Forest
- K-Nearest Neighbors
- Gradient Boosting
- Support Vector Machine
✅ Final model chosen based on accuracy and generalization performance
- Clone the repo:
git clone https://github.com/Anna-Ann11/passenger-satisfaction-prediction.git cd passenger-satisfaction-prediction
pip install -r requirements.txt
jupyter notebook passenger_model.ipynb
iface.launch()






