Bike Sharing Prediction

🧳 Customer Booking Prediction
Project Type: Classification Model | Industry Focus: Travel / Hospitality / SaaS | Tools Used: Python, Scikit-learn, Pandas, Matplotlib, Seaborn
🔍 Project Overview
Developed a predictive classification model to determine the likelihood of a customer completing a booking. The project enables businesses to reduce cart abandonment, optimize marketing strategies, and increase conversion rates.
🎯 Objectives
- Predict whether a user will finalize a booking based on interaction data
- Identify key behavioral signals that drive or hinder booking decisions
- Support customer retention and upsell strategies with actionable insights
🧩 Dataset
- Source: Public travel/hotel booking dataset (Kaggle / simulated CRM data)
- Features: Session duration, page views, referral source, device type, number of searches, past bookings, user demographics
- Target: Booking Status (Booked / Not Booked)
🛠️ Techniques & Methodology
- Exploratory data analysis and feature selection using correlation heatmaps
- Data preprocessing: scaling, encoding categorical variables, handling class imbalance
- Applied models: Logistic Regression, Random Forest, Gradient Boosting
- Evaluated with Precision, Recall, F1-Score, and ROC-AUC
🚀 Key Results
- Achieved an F1-score of 0.87 with the Gradient Boosting model
- Top features influencing bookings: session duration, device type, referral channel
- Created a scoring dashboard to help sales teams prioritize high-potential leads
💼 Business Impact
This model empowers marketing and sales teams with predictive intelligence, allowing proactive customer engagement, reducing churn, and increasing overall booking conversion. It can be integrated into CRM workflows to score and segment users in real-time.
Key Results
Achieved ~99.7% r2 Score with the RandomForestRegressor with skfold model. Identified that repayment history and credit utilization were the most influential features. Deployed the final model using Streamlit for an interactive credit risk scoring demo.
Code Snippet
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
from sklearn.compose import ColumnTransformer
from sklearn.pipeline import Pipeline
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler,OrdinalEncoder
from sklearn.impute import SimpleImputer
from sklearn.ensemble import RandomForestRegressor
from sklearn.metrics import r2_score,mean_absolute_error,mean_squared_error
import joblib
sns.set()
# Load the dataset
df=pd.read_csv('/kaggle/input/bike-share-daily-data/bike_sharing_daily.csv')
df.head()
# Preprocessing
num_trans=Pipeline(steps=[('imputer',SimpleImputer()),('scaler',StandardScaler())])
# Categorical tranformation
cat_trans=Pipeline(steps=[('imputer',SimpleImputer(strategy='constant')),('encoder',OrdinalEncoder())])
numeric_features = ['temp', 'atemp', 'hum', 'windspeed','casual','registered']
categorical_features = ['season', 'mnth', 'holiday', 'weekday', 'workingday', 'weathersit']
# column Tranformer
preprocessor=ColumnTransformer(transformers=[('numeric', num_trans, numeric_features),
('categorical', cat_trans, categorical_features)])
# Initialize and train the model
model=pipeline.fit(x_train,y_train)
model.score(x_train,y_train)
# Evaluate the model
y_pred=model.predict(x_test)
pd.DataFrame({'r2_score':[r2_score(y_test,y_pred).round(3)*100],'mean_squared_error':[mean_squared_error(y_test,y_pred)],'mean_absolute_error':[mean_absolute_error(y_test,y_pred)]})



















