SlideShare a Scribd company logo
1 of 10
Marketing Analytics - Session-4
Abhishek Kumar | Boston University
Webinar - Marketing Analytics
Agenda
- Recap from the last week
- Continue with Exploratory data analysis
- Linear regression
- Multi Linear regression
- Model efficiency
- Q&A
Exploratory data analysis
- Dist Plot
- Box Plot
- Scatter Plot
- Hist Plot
- Line Plot
- Pair Plot
Building a Model
- Data collection
- Data Cleaning(cleaning, scaling,normalization etc.)
- Split the data in train and test
- Choose a model
- Training the model(Fit to the model)
- Test your model
- Evaluate your model
Building a Linear Regression Model
1. x=df[[ 'Avg. Session Length', 'Time on App', 'Time on Website', 'Length of
Membership']]
2. y=df['Yearly Amount Spent']
3. x_train,x_test,y_train,y_test=train_test_split(x,y,test_size=0.4,random_state=101)
4. lm=LinearRegression()
5. lm.fit(x_train,y_train)
Things to Remember - Linear Regression
- Multicollinearity in multiple linear regression
- Normality in the distribution
- Independency in values of output variables
Linear Model evaluation parameters
- R-squared/Adjusted R-square
- Measure the percentage of variation in the dependent variable explained by the predictor
- Root Mean Square Error(RMSE)
- Measure the sq root of average of the squared difference between the observed and
actual value. Lower the better
- Mean Absolute Error
- Measure the average of absolute difference between the observed and the actual value
Appendix
Model efficiency
Linear Regression Model in detail
Webinar - Marketing Analytics

More Related Content

Similar to Webinar 04 - Predictive Analytics with Python & Jupyter Notebook

Mca1040 system analysis and design
Mca1040  system analysis and designMca1040  system analysis and design
Mca1040 system analysis and design
smumbahelp
 
WebSphere Business Process Simulationon
WebSphere Business Process SimulationonWebSphere Business Process Simulationon
WebSphere Business Process Simulationon
randikaucsc
 
ClassifyingIssuesFromSRTextAzureML
ClassifyingIssuesFromSRTextAzureMLClassifyingIssuesFromSRTextAzureML
ClassifyingIssuesFromSRTextAzureML
George Simov
 

Similar to Webinar 04 - Predictive Analytics with Python & Jupyter Notebook (20)

Cab Booking Cancellation
Cab Booking CancellationCab Booking Cancellation
Cab Booking Cancellation
 
Experimenting with Data!
Experimenting with Data!Experimenting with Data!
Experimenting with Data!
 
Machine learning in action at Pipedrive
Machine learning in action at PipedriveMachine learning in action at Pipedrive
Machine learning in action at Pipedrive
 
kdd2015
kdd2015kdd2015
kdd2015
 
Mca1040 system analysis and design
Mca1040  system analysis and designMca1040  system analysis and design
Mca1040 system analysis and design
 
STOCK PRICE PREDICTION USING MACHINE LEARNING [RANDOM FOREST REGRESSION MODEL]
STOCK PRICE PREDICTION USING MACHINE LEARNING [RANDOM FOREST REGRESSION MODEL]STOCK PRICE PREDICTION USING MACHINE LEARNING [RANDOM FOREST REGRESSION MODEL]
STOCK PRICE PREDICTION USING MACHINE LEARNING [RANDOM FOREST REGRESSION MODEL]
 
Business Analytics Forum #BAF3
Business Analytics Forum #BAF3Business Analytics Forum #BAF3
Business Analytics Forum #BAF3
 
Data Science in the Elastic Stack
Data Science in the Elastic StackData Science in the Elastic Stack
Data Science in the Elastic Stack
 
WebSphere Business Process Simulationon
WebSphere Business Process SimulationonWebSphere Business Process Simulationon
WebSphere Business Process Simulationon
 
machine learning basic-1.pptx
machine learning basic-1.pptxmachine learning basic-1.pptx
machine learning basic-1.pptx
 
ml-02x01.pdf
ml-02x01.pdfml-02x01.pdf
ml-02x01.pdf
 
Machine learning
Machine learning Machine learning
Machine learning
 
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...
 
Cloudera Movies Data Science Project On Big Data
Cloudera Movies Data Science Project On Big DataCloudera Movies Data Science Project On Big Data
Cloudera Movies Data Science Project On Big Data
 
Demystifying Data Science Webinar - February 14, 2018
Demystifying Data Science Webinar - February 14, 2018Demystifying Data Science Webinar - February 14, 2018
Demystifying Data Science Webinar - February 14, 2018
 
Knowledge discovery claudiad amato
Knowledge discovery claudiad amatoKnowledge discovery claudiad amato
Knowledge discovery claudiad amato
 
Nose Dive into Apache Spark ML
Nose Dive into Apache Spark MLNose Dive into Apache Spark ML
Nose Dive into Apache Spark ML
 
ClassifyingIssuesFromSRTextAzureML
ClassifyingIssuesFromSRTextAzureMLClassifyingIssuesFromSRTextAzureML
ClassifyingIssuesFromSRTextAzureML
 
Ml intro
Ml introMl intro
Ml intro
 
Ml intro
Ml introMl intro
Ml intro
 

More from Ashish Kulkarni

More from Ashish Kulkarni (7)

Fundamentals of HTML
Fundamentals of HTMLFundamentals of HTML
Fundamentals of HTML
 
Webinar 03 - Data Analysis with Python and Jupyter Notebook
Webinar 03 - Data Analysis with Python and Jupyter NotebookWebinar 03 - Data Analysis with Python and Jupyter Notebook
Webinar 03 - Data Analysis with Python and Jupyter Notebook
 
Webinar 02 - Web Analytics & Data Analysis Using Python | Marketing Analytics
Webinar 02 - Web Analytics & Data Analysis Using Python | Marketing Analytics Webinar 02 - Web Analytics & Data Analysis Using Python | Marketing Analytics
Webinar 02 - Web Analytics & Data Analysis Using Python | Marketing Analytics
 
Career Connect High Impact Practices Considerations
Career Connect High Impact Practices ConsiderationsCareer Connect High Impact Practices Considerations
Career Connect High Impact Practices Considerations
 
Reflection matters
Reflection mattersReflection matters
Reflection matters
 
Campaign tracking in Google Analytics
Campaign tracking in Google AnalyticsCampaign tracking in Google Analytics
Campaign tracking in Google Analytics
 
Let's Save The Planet By Tulsi Tanti
Let's Save The Planet By Tulsi TantiLet's Save The Planet By Tulsi Tanti
Let's Save The Planet By Tulsi Tanti
 

Recently uploaded

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 

Recently uploaded (20)

ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 

Webinar 04 - Predictive Analytics with Python & Jupyter Notebook

  • 1. Marketing Analytics - Session-4 Abhishek Kumar | Boston University
  • 3. Agenda - Recap from the last week - Continue with Exploratory data analysis - Linear regression - Multi Linear regression - Model efficiency - Q&A
  • 4. Exploratory data analysis - Dist Plot - Box Plot - Scatter Plot - Hist Plot - Line Plot - Pair Plot
  • 5. Building a Model - Data collection - Data Cleaning(cleaning, scaling,normalization etc.) - Split the data in train and test - Choose a model - Training the model(Fit to the model) - Test your model - Evaluate your model
  • 6. Building a Linear Regression Model 1. x=df[[ 'Avg. Session Length', 'Time on App', 'Time on Website', 'Length of Membership']] 2. y=df['Yearly Amount Spent'] 3. x_train,x_test,y_train,y_test=train_test_split(x,y,test_size=0.4,random_state=101) 4. lm=LinearRegression() 5. lm.fit(x_train,y_train)
  • 7. Things to Remember - Linear Regression - Multicollinearity in multiple linear regression - Normality in the distribution - Independency in values of output variables
  • 8. Linear Model evaluation parameters - R-squared/Adjusted R-square - Measure the percentage of variation in the dependent variable explained by the predictor - Root Mean Square Error(RMSE) - Measure the sq root of average of the squared difference between the observed and actual value. Lower the better - Mean Absolute Error - Measure the average of absolute difference between the observed and the actual value
  • 10. Webinar - Marketing Analytics