Team Nithya
Team Nithya
Problem Statement:
In Today's Dynamic Travel Market, Consumers struggle to discern the best times to book
flight and hotel arrangements due to unpredictable price fluctuations influenced by seasonal
demand, market trends, and availability. Existing solutions, such as price comparison
websites and travel agents, lack the sophistication to accurately predict these fluctuations,
leaving travellers at risk of overspending or missing out on savings. Thus, there is a pressing
need for a comprehensive solution leveraging machine learning to analyse historical pricing
data, seasonal trends, and market demand, providing actionable insights for optimal booking
times. The proposed Dynamic Flight and Hotel Price Predictor addresses this gap by
employing advanced algorithms to forecast price trends accurately, offering personalized
recommendations and real-time alerts to ensure users make informed decisions, enhancing
their travel experience and saving money in the process.
Problem Description:
Solution Approach
User Profiles: Users create personalized profiles with their travel preferences, including:
• Budget constraints.
• Preferred airlines or hotel chains.
• Travel dates and flexibility.
Implementing advanced machine learning models to predict flight and hotel prices:
Considering features such as booking date, departure date, lead time, and market events.
User-Friendly Interface:
Flight Price Tracker: Users input their desired route and travel dates. The system provides
realtime updates on price fluctuations.
Hotel Price Watch: Users receive notifications when hotel rates drop below their specified
budget.
Personalized Itineraries:
BENEFITS
1. Flexible Travel Planning: Armed with insights into price trends, travelers have the flexibility to
adjust their travel dates or destinations to align with more affordable options. This flexibility
can be particularly beneficial for those with flexible schedules or who are seeking the best
value for their money.
2. Improved Budget Management: Predictive pricing information allows travelers to plan and
budget their trips more effectively. By knowing when prices are expected to be high or low,
travelers can allocate their travel funds more efficiently, ensuring they get the most out of
their travel budget without overspending.
3. Enhanced Competitiveness for Businesses: Airlines, hotels, and travel agencies can leverage
predictive pricing models to stay competitive in the market. By offering dynamic pricing that
reflects demand fluctuations, businesses can attract priceconscious travelers while
maximizing revenue and occupancy rates. This allows them to maintain a competitive edge in
the industry and adapt to changing market conditions more effectively.
How Dynamic Pricing Works?
Dynamic pricing strategies replace fixed prices with fluctuating prices, calculated and updated in
an automated way based on a bunch of variables. The main goal of dynamic pricing is to
maximize revenue and profit by adjusting prices according to real-time market demand and
supply. By doing so, businesses can adapt to changes in the market and stay competitive.
6/28/24, 11:50 PM Welcome To Colab - Colab
X = combined_hotel_data.drop('adr', axis=1)
y = combined_hotel_data['adr']
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
#Train models like Linear Regression, Decision Trees, and Random Forest
from sklearn.linear_model import LinearRegression
from sklearn.tree import DecisionTreeRegressor
from sklearn.ensemble import RandomForestRegressor
models = {
'Linear Regression': LinearRegression(),
'Decision Tree': DecisionTreeRegressor(),
'Random Forest': RandomForestRegressor()
}
https://colab.research.google.com/#scrollTo=JyuQJET6921-&printMode=true 3/5
6/28/24, 11:50 PM Welcome To Colab - Colab
#Use Grid Search or Random Search:
param_grid = {
'n_estimators': [50, 100, 200],
'max_depth': [None, 10, 20, 30]
}
y_pred = best_model.predict(X_test)
print("Mean Absolute Error:", mean_absolute_error(y_test, y_pred))
print("Mean Squared Error:", mean_squared_error(y_test, y_pred))
print("R-squared:", r2_score(y_test, y_pred))
y_pred = best_model.predict(X_test)
print("Mean Absolute Error:", mean_absolute_error(y_test, y_pred))
print("Mean Squared Error:", mean_squared_error(y_test, y_pred))
print("R-squared:", r2_score(y_test, y_pred))
#Perform cross-validation:
importances = best_model.feature_importances_
feature_names = X.columns
feature_importances = pd.Series(importances, index=feature_names)
feature_importances = feature_importances.sort_values(ascending=False)
print(feature_importances)
joblib.dump(best_model, 'hotel_price_prediction_model.pkl')
import streamlit as st
import joblib
model = joblib.load('hotel_price_prediction_model.pkl')
if st.button("Predict"):
prediction = model predict([[lead time stays in weekend nights stays in week nights adults ]])
https://colab.research.google.com/#scrollTo=JyuQJET6921-&printMode=true 4/5
6/28/24, 11:50 PM Welcome To Colab - Colab
prediction model.predict([[lead_time, stays_in_weekend_nights, stays_in_week_nights, adults, ...]])
st.write(f"Predicted Price: {prediction[0]}")
https://colab.research.google.com/#scrollTo=JyuQJET6921-&printMode=true 5/5
Rishi and Deekshith
Subscription-Based Model:
Freemium Tier: Provide basic features for free to attract users and build a
customer base.
Paid Tier: Offer advanced features and insights, such as more accurate price
predictions, personalized recommendations, and exclusive deals, for a
subscription fee.
Engagement: Use engaging content and tools in the free tier to demonstrate
value.
Personalization: Offer personalized offers and insights to free users as a teaser
for the paid features.
Limited-Time Offers: Provide discounts on the subscription fee for first-time
users or during special promotions.
User Education: Regularly update users about the benefits of the paid tier
through newsletters and in-app notifications.
Financial Equation:
𝑌=𝑃×(1+𝑟)𝑡
Where:
Y = Revenue over time
P = Initial subscription price
r = Growth rate
t = Time interval (in months)
Equation with Values:
𝑌=100×(1+0.04)𝑡
Financial Projection
Here are the calculations for the first few months to provide a sense of the growth
pattern:
Month 1:
𝑌1=100×(1+0.04)1=100×1.04=104
Month 2:
𝑌2=100×(1+0.04)2=100×1.0816=108.16
Month 3:
𝑌3=100×(1+0.04)3=100×1.124864=112.49
Month 12:
𝑌12=100×(1+0.04)12=100×1.601032=160.10
Month 24:
𝑌24=100×(1+0.04)24=100×2.563038=256.30
This example illustrates how the subscription revenue grows over time with
a 4% monthly growth rate. Let's now plot the graph to visualize this growth.
Here is the graph showing the revenue growth over 24 months for the
dynamic flight and hotel price prediction service.
Financial Equation Recap:
𝑌=100×(1+0.04)𝑡
Month 1: $104
Month 12: $160.10
Month 24: $256.30