SlideShare a Scribd company logo
1 of 25
DEPARTMENT OF ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING
INTERSHIP PRESENTATION ON
“PIZZA SALES”
Under the guidance of :
Ms. Farheen Farhath
Project Lead
PRESENTED BY:
Gagana.(1BI20AI013)
BANGALORE INSTITUTE OF TECHNOLOGY
DEPARTMENT OF ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING
ABSTRACT
• This project seeks to develop a predictive model for a pizza restaurant
to forecast sales accurately. This model utilizes historical sales data,
weather conditions, promotions, and other pertinent factors to optimize
inventory management, staff scheduling, and marketing strategies. By
applying machine learning techniques, this project aims to enhance the
restaurant's operational efficiency, reduce wastage, improve
profitability, and empower data-driven decision-making. The project's
significance lies in its practical application of machine learning within
the food service industry, offering a scalable solution for similar
businesses to harness the benefits of predictive analytics and informed
decision-making.
2
CONTENTS
1. Introduction
2. Problem Statement
3. Objective
4. Dataset
5. Libraries Used
6. Implementation (Code)
7. Outcome of the Project
8. Conclusion
INTRODUCTION
• Pizza, a culinary delight, holds a unique place in the world of food. In
the competitive pizza restaurant industry, efficiency is key. We
explore a dataset encompassing sales data, date-time records, menu
items, pricing, promotions, and weather conditions to uncover the
drivers behind pizza sales.
⇨ Our aim is to empower pizzerias with predictive insights by
deciphering historical patterns. This enables them to optimize
operations, reduce waste, and enhance customer satisfaction.
PROBLEM STATEMENT
• The pizza restaurant industry requires an accurate sales
forecasting solution to optimize inventory management, staffing,
and promotions. This project aims to develop a machine learning
model that uses historical sales data and relevant factors to predict
future pizza sales, enabling data-driven decisions and improving
operational efficiency within the food service sector.
OBJECTIVES
• To predict the price of pizza.
• An approach to receive higher accuracy.
• To build a machine learning model to classify the given
problem statement.
DATASET
 Pandas (for handling data files)
 Matplotlib(for data visualization)
 Seaborn(for data visualization)
LIBRARIES
IMPLEMENTATION
# importing necessary libraries
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
From sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression
from sklearn.preprocessing import LabelEncoder
From sklearn.svm import SVR
data=pd.read_csv("pizzaplace.csv")
# Display Top 5 Rows of The Dataset
data.head()
# Check Last 5 Rows of The Dataset
data.tail()
9
10
# Find Shape of Our Dataset(Number of Rows And Number of Columns)
data.shape
print("number of rows ",data.shape[0])
print("number of columns ",data.shape[1])
# Get Information About Our Dataset Like Total Number of Rows,Total Number of
Columns,Datatypes of Each Column And Memory Requirement
data.info()
# Check Null Values In The Dataset
data.isnull()
data.isnull().sum()
# Get Overall Statistics About The Dataset
data.describe()
# Data Preprocessing
data.head()
# Check the data type of the 'price' column
print(data['price'].dtype)
11
# If the 'price' column is not of string type, convert it to strings
data['price'] = data['price'].astype(str)
# Replace commas and convert to int
data['price'] = data['price'].str.replace(",", "").astype(float).round().astype('int32')
data.head()
data.info()
def convert(value):
return value*0.0054
data['price'].apply(convert)
data.head()
# Data Analysis
# What is Univariate Analysis
data.columns
# Id
data['id'].value_counts()
# Price
import matplotlib.pyplot as plt
plt.hist(x="price",data=data)
plt.title("price distribution")
plt.show()
12
# Date
data['date'].value_counts()
import seaborn as sns
sns.countplot(data['date'])
# Type
data['type'].value_counts()
sns.countplot(data['type'])
# Size
data['size'].value_counts()
sns.countplot(data['size'])
# Bivariate Analysis
# Price by Type
data.columns
sns.barplot(data['type'],data['price'])
# Price By Size
data.columns
sns.boxplot(x='size',y='price',data=data)
13
# Find The Most Expensive Pizza
data.columns
data['price'].max()
data['price'].max()==data['price']
data[data['price'].max()==data['price']]
# Find Type of M Size pizzas
data.columns
data['size']=='M'
data[data['size']=='M']
data[data['size']=='M']['type'].head()
# Find Type of XL size Pizzas
data['size']=='XL'
data[data['size']=='XL']
data[data['size']=='XL']['type'].head()
# Label Encoding
cat_cols=data.select_dtypes(include=['object']).columns
cat_cols
from sklearn.preprocessing import LabelEncoder
en=LabelEncoder()
for i in cat_cols:
data[i]=en.fit_transform(data[i]) data.head()
14
# Store Feature Matrix In x and Response(Target) In Vector y
x=data.drop('price',axis=1)
y=data['price']
# Splitting The Dataset Into The Training Set And Test Set
from sklearn.model_selection import train_test_split
x_train,x_test,y_train,y_test=train_test_split(x,y,test_size=0.20,random_state=42)
# Import The Models
data.head() ]
from sklearn.linear_model import LinearRegression
from sklearn.svm import SVR
# Model Training
lr = LinearRegression()
lr.fit(x_train,y_train)
svm = SVR()
svm.fit(x_train,y_train)
# Prediction on Test Data
y_pred1=lr.predict(x_test)
y_pred2=svm.predict(x_test)
15
# Evaluating The Algorithm
from sklearn import metrics
score1=metrics.r2_score(y_test,y_pred1)
score2=metrics.r2_score(y_test,y_pred2)
print(score1,score2)
final_data=pd.DataFrame({'Models':['LR','SVR'],'R2_SCORE':[score1,score2]})
final_data
import seaborn as sns
sns.barplot(final_data['Models'],final_data['R2_SCORE'])
# Save the Model
x=data.drop('price',axis=1)
y=data['price']
lr=LinearRegression()
lr.fit(x,y)
import joblib
joblib.dump(lr,'pizza_price_predict')
model=joblib.load('pizza_price_predict')
16
import pandas as pd
df=pd.DataFrame({ 'Unnamed: 0':1,
'id':1,
'date':22.0,
'time':2,
'name':8,
'size':1,
'type':1 },I
ndex=[0])
df
model.predict(df)
SNAPSHOTS
17
18
Date
19
Type
20
Size
21
Price by Type
22
Price by Size
23
Evaluating The Algorithm
CONCLUSION
• I have found the important features which could play a vital role in
Pizza Sales and non influential features as well. I studied the
report of prediction carefully. I can expand the existing system
with additional analysis methods and implementation with neural
networks and deep learning.
24
THANK YOU

More Related Content

Similar to ppt (1).pptx

Aminullah Assagaf_P4-Ch.6_Processes and technology-32.pptx
Aminullah Assagaf_P4-Ch.6_Processes and technology-32.pptxAminullah Assagaf_P4-Ch.6_Processes and technology-32.pptx
Aminullah Assagaf_P4-Ch.6_Processes and technology-32.pptx
Aminullah Assagaf
 

Similar to ppt (1).pptx (20)

A business level introduction to Artificial Intelligence - Louis Dorard @ PAP...
A business level introduction to Artificial Intelligence - Louis Dorard @ PAP...A business level introduction to Artificial Intelligence - Louis Dorard @ PAP...
A business level introduction to Artificial Intelligence - Louis Dorard @ PAP...
 
Machine intelligence data science methodology 060420
Machine intelligence data science methodology 060420Machine intelligence data science methodology 060420
Machine intelligence data science methodology 060420
 
AI Class Topic 3: Building Machine Learning Predictive Systems (Predictive Ma...
AI Class Topic 3: Building Machine Learning Predictive Systems (Predictive Ma...AI Class Topic 3: Building Machine Learning Predictive Systems (Predictive Ma...
AI Class Topic 3: Building Machine Learning Predictive Systems (Predictive Ma...
 
Tarun datascientist affle
Tarun datascientist affleTarun datascientist affle
Tarun datascientist affle
 
How to Realize an Additional 270% ROI on Snowflake
How to Realize an Additional 270% ROI on SnowflakeHow to Realize an Additional 270% ROI on Snowflake
How to Realize an Additional 270% ROI on Snowflake
 
Agile Network India | T Shirt Sizing Model for DevOps COE | Bharti Goyal Maan
Agile Network India | T Shirt Sizing Model for DevOps COE | Bharti Goyal MaanAgile Network India | T Shirt Sizing Model for DevOps COE | Bharti Goyal Maan
Agile Network India | T Shirt Sizing Model for DevOps COE | Bharti Goyal Maan
 
Data Mining and Analytics
Data Mining and AnalyticsData Mining and Analytics
Data Mining and Analytics
 
BIG MART SALES PREDICTION USING MACHINE LEARNING
BIG MART SALES PREDICTION USING MACHINE LEARNINGBIG MART SALES PREDICTION USING MACHINE LEARNING
BIG MART SALES PREDICTION USING MACHINE LEARNING
 
Customer analytics for e commerce
Customer analytics for e commerceCustomer analytics for e commerce
Customer analytics for e commerce
 
Tuning for Systematic Trading: Talk 3: Training, Tuning, and Metric Strategy
Tuning for Systematic Trading: Talk 3: Training, Tuning, and Metric StrategyTuning for Systematic Trading: Talk 3: Training, Tuning, and Metric Strategy
Tuning for Systematic Trading: Talk 3: Training, Tuning, and Metric Strategy
 
Engineering plant facilities 17 artificial intelligence algorithms & proc...
Engineering plant facilities 17 artificial intelligence algorithms & proc...Engineering plant facilities 17 artificial intelligence algorithms & proc...
Engineering plant facilities 17 artificial intelligence algorithms & proc...
 
Engineering plant facilities 17 artificial intelligence algorithms & proc...
Engineering plant facilities 17 artificial intelligence algorithms & proc...Engineering plant facilities 17 artificial intelligence algorithms & proc...
Engineering plant facilities 17 artificial intelligence algorithms & proc...
 
Dwbi Project
Dwbi ProjectDwbi Project
Dwbi Project
 
Retail Design
Retail DesignRetail Design
Retail Design
 
Six sigma training
Six sigma trainingSix sigma training
Six sigma training
 
Six sigma training
Six sigma trainingSix sigma training
Six sigma training
 
Aminullah Assagaf_P4-Ch.6_Processes and technology-32.pptx
Aminullah Assagaf_P4-Ch.6_Processes and technology-32.pptxAminullah Assagaf_P4-Ch.6_Processes and technology-32.pptx
Aminullah Assagaf_P4-Ch.6_Processes and technology-32.pptx
 
BATCH 1 FIRST REVIEW-1.pptx
BATCH 1 FIRST REVIEW-1.pptxBATCH 1 FIRST REVIEW-1.pptx
BATCH 1 FIRST REVIEW-1.pptx
 
DS Life Cycle
DS Life CycleDS Life Cycle
DS Life Cycle
 
DS Life Cycle
DS Life CycleDS Life Cycle
DS Life Cycle
 

Recently uploaded

21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx
rahulmanepalli02
 
INTERRUPT CONTROLLER 8259 MICROPROCESSOR
INTERRUPT CONTROLLER 8259 MICROPROCESSORINTERRUPT CONTROLLER 8259 MICROPROCESSOR
INTERRUPT CONTROLLER 8259 MICROPROCESSOR
TanishkaHira1
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
AldoGarca30
 
Introduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptxIntroduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptx
hublikarsn
 

Recently uploaded (20)

Databricks Generative AI Fundamentals .pdf
Databricks Generative AI Fundamentals  .pdfDatabricks Generative AI Fundamentals  .pdf
Databricks Generative AI Fundamentals .pdf
 
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptx
 
Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)
 
21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx
 
analog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptxanalog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptx
 
History of Indian Railways - the story of Growth & Modernization
History of Indian Railways - the story of Growth & ModernizationHistory of Indian Railways - the story of Growth & Modernization
History of Indian Railways - the story of Growth & Modernization
 
INTERRUPT CONTROLLER 8259 MICROPROCESSOR
INTERRUPT CONTROLLER 8259 MICROPROCESSORINTERRUPT CONTROLLER 8259 MICROPROCESSOR
INTERRUPT CONTROLLER 8259 MICROPROCESSOR
 
TMU_GDSC_20240509.pdfTMU_GDSC_20240509.pdf
TMU_GDSC_20240509.pdfTMU_GDSC_20240509.pdfTMU_GDSC_20240509.pdfTMU_GDSC_20240509.pdf
TMU_GDSC_20240509.pdfTMU_GDSC_20240509.pdf
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 
Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...
Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...
Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptx
 
Introduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptxIntroduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptx
 
Adsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) pptAdsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) ppt
 
Working Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdfWorking Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdf
 
Computer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesComputer Graphics Introduction To Curves
Computer Graphics Introduction To Curves
 
Presentation on Slab, Beam, Column, and Foundation/Footing
Presentation on Slab,  Beam, Column, and Foundation/FootingPresentation on Slab,  Beam, Column, and Foundation/Footing
Presentation on Slab, Beam, Column, and Foundation/Footing
 
Lect.1: Getting Started (CS771: Machine Learning by Prof. Purushottam Kar, II...
Lect.1: Getting Started (CS771: Machine Learning by Prof. Purushottam Kar, II...Lect.1: Getting Started (CS771: Machine Learning by Prof. Purushottam Kar, II...
Lect.1: Getting Started (CS771: Machine Learning by Prof. Purushottam Kar, II...
 
5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...
 

ppt (1).pptx

  • 1. DEPARTMENT OF ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING INTERSHIP PRESENTATION ON “PIZZA SALES” Under the guidance of : Ms. Farheen Farhath Project Lead PRESENTED BY: Gagana.(1BI20AI013) BANGALORE INSTITUTE OF TECHNOLOGY DEPARTMENT OF ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING
  • 2. ABSTRACT • This project seeks to develop a predictive model for a pizza restaurant to forecast sales accurately. This model utilizes historical sales data, weather conditions, promotions, and other pertinent factors to optimize inventory management, staff scheduling, and marketing strategies. By applying machine learning techniques, this project aims to enhance the restaurant's operational efficiency, reduce wastage, improve profitability, and empower data-driven decision-making. The project's significance lies in its practical application of machine learning within the food service industry, offering a scalable solution for similar businesses to harness the benefits of predictive analytics and informed decision-making. 2
  • 3. CONTENTS 1. Introduction 2. Problem Statement 3. Objective 4. Dataset 5. Libraries Used 6. Implementation (Code) 7. Outcome of the Project 8. Conclusion
  • 4. INTRODUCTION • Pizza, a culinary delight, holds a unique place in the world of food. In the competitive pizza restaurant industry, efficiency is key. We explore a dataset encompassing sales data, date-time records, menu items, pricing, promotions, and weather conditions to uncover the drivers behind pizza sales. ⇨ Our aim is to empower pizzerias with predictive insights by deciphering historical patterns. This enables them to optimize operations, reduce waste, and enhance customer satisfaction.
  • 5. PROBLEM STATEMENT • The pizza restaurant industry requires an accurate sales forecasting solution to optimize inventory management, staffing, and promotions. This project aims to develop a machine learning model that uses historical sales data and relevant factors to predict future pizza sales, enabling data-driven decisions and improving operational efficiency within the food service sector.
  • 6. OBJECTIVES • To predict the price of pizza. • An approach to receive higher accuracy. • To build a machine learning model to classify the given problem statement.
  • 8.  Pandas (for handling data files)  Matplotlib(for data visualization)  Seaborn(for data visualization) LIBRARIES
  • 9. IMPLEMENTATION # importing necessary libraries import pandas as pd import matplotlib.pyplot as plt import seaborn as sns From sklearn.model_selection import train_test_split from sklearn.linear_model import LinearRegression from sklearn.preprocessing import LabelEncoder From sklearn.svm import SVR data=pd.read_csv("pizzaplace.csv") # Display Top 5 Rows of The Dataset data.head() # Check Last 5 Rows of The Dataset data.tail() 9
  • 10. 10 # Find Shape of Our Dataset(Number of Rows And Number of Columns) data.shape print("number of rows ",data.shape[0]) print("number of columns ",data.shape[1]) # Get Information About Our Dataset Like Total Number of Rows,Total Number of Columns,Datatypes of Each Column And Memory Requirement data.info() # Check Null Values In The Dataset data.isnull() data.isnull().sum() # Get Overall Statistics About The Dataset data.describe() # Data Preprocessing data.head() # Check the data type of the 'price' column print(data['price'].dtype)
  • 11. 11 # If the 'price' column is not of string type, convert it to strings data['price'] = data['price'].astype(str) # Replace commas and convert to int data['price'] = data['price'].str.replace(",", "").astype(float).round().astype('int32') data.head() data.info() def convert(value): return value*0.0054 data['price'].apply(convert) data.head() # Data Analysis # What is Univariate Analysis data.columns # Id data['id'].value_counts() # Price import matplotlib.pyplot as plt plt.hist(x="price",data=data) plt.title("price distribution") plt.show()
  • 12. 12 # Date data['date'].value_counts() import seaborn as sns sns.countplot(data['date']) # Type data['type'].value_counts() sns.countplot(data['type']) # Size data['size'].value_counts() sns.countplot(data['size']) # Bivariate Analysis # Price by Type data.columns sns.barplot(data['type'],data['price']) # Price By Size data.columns sns.boxplot(x='size',y='price',data=data)
  • 13. 13 # Find The Most Expensive Pizza data.columns data['price'].max() data['price'].max()==data['price'] data[data['price'].max()==data['price']] # Find Type of M Size pizzas data.columns data['size']=='M' data[data['size']=='M'] data[data['size']=='M']['type'].head() # Find Type of XL size Pizzas data['size']=='XL' data[data['size']=='XL'] data[data['size']=='XL']['type'].head() # Label Encoding cat_cols=data.select_dtypes(include=['object']).columns cat_cols from sklearn.preprocessing import LabelEncoder en=LabelEncoder() for i in cat_cols: data[i]=en.fit_transform(data[i]) data.head()
  • 14. 14 # Store Feature Matrix In x and Response(Target) In Vector y x=data.drop('price',axis=1) y=data['price'] # Splitting The Dataset Into The Training Set And Test Set from sklearn.model_selection import train_test_split x_train,x_test,y_train,y_test=train_test_split(x,y,test_size=0.20,random_state=42) # Import The Models data.head() ] from sklearn.linear_model import LinearRegression from sklearn.svm import SVR # Model Training lr = LinearRegression() lr.fit(x_train,y_train) svm = SVR() svm.fit(x_train,y_train) # Prediction on Test Data y_pred1=lr.predict(x_test) y_pred2=svm.predict(x_test)
  • 15. 15 # Evaluating The Algorithm from sklearn import metrics score1=metrics.r2_score(y_test,y_pred1) score2=metrics.r2_score(y_test,y_pred2) print(score1,score2) final_data=pd.DataFrame({'Models':['LR','SVR'],'R2_SCORE':[score1,score2]}) final_data import seaborn as sns sns.barplot(final_data['Models'],final_data['R2_SCORE']) # Save the Model x=data.drop('price',axis=1) y=data['price'] lr=LinearRegression() lr.fit(x,y) import joblib joblib.dump(lr,'pizza_price_predict') model=joblib.load('pizza_price_predict')
  • 16. 16 import pandas as pd df=pd.DataFrame({ 'Unnamed: 0':1, 'id':1, 'date':22.0, 'time':2, 'name':8, 'size':1, 'type':1 },I ndex=[0]) df model.predict(df)
  • 24. CONCLUSION • I have found the important features which could play a vital role in Pizza Sales and non influential features as well. I studied the report of prediction carefully. I can expand the existing system with additional analysis methods and implementation with neural networks and deep learning. 24