SlideShare a Scribd company logo
1 of 20
Price Optimisation with Python
Ammar Mohemmed
21/07/2019
• In 1985, American Airlines was threatened on its core routes by
the low-fare carrier PeopleExpress. In response, American developed
an optimisation algorithm to set the prices dynamically
• In 2012, the travel site Orbitz was found to be adjusting its prices
for users of Apple Mac computers
• The Wall Street Journal revealed that the Staples website
offered products at different prices depending on the user’s proximity
to rival stores
• Using data to adjust prices in order to achieve maximum revenue or
profit
• Price change period from a year to minutes
• Single product or multiple products
• Considering the substitute from own company and competitors
• Considering the laddering (same product but different size or weight or
count)
• New products with not enough data
• Considering other business constraints
• Demand: Quantity sold, number of vehicles, no. of passengers …
• Law of demand: that other factors being constant (cetris peribus), price
and quantity demand of any good and service are inversely related to
each other. When the price of a product increases, the demand for the
same product will fall.
• How to extract possible cofounding variables.
• Linear, polynomial or exponential relationship is fitted.
Estimate the demand vs price
relationship
Maximize the revenue by
optimization
Q = b0 + b1 * P R = (b0 + b1 * P) * P
Linear, polynomial or exponential relationship is fitted.
• Is a phenomenon in probability and statistics, in which a trend appears
in several different groups of data but disappears or reverses when
these groups are combined (Wikipedia)
Quantity increases with price, but difference of quantity decreases
Quantity
Quantity vs. price Quantity difference vs. price
Quantity
difference
Objective function:
Profit – Q1*(P1-C1) + Q2*(P2-C2) + Q3*(P3-C3)
• Variables: P1, P2, P3
• Constraints:
 Product-2 price higher than Product-3 by 1
 Product-1 higher than its cost by 0.5
 Product-1 higher than product-2 by 1.7
• Bounds:
 Max price: 50
 Min price: product cost
• Not considering cross-relationship
Any optimization problem has
three components:
1. Decision variables
2. The objective function
3. Constraints
General Optimisation Problem:
• Very difficult to solve
• Longer computation time, not
always finding the solution
• Heuristic optimization
methods
Exception:
• Least square problems
• Linear programming problems
• Convex optimisation
Business
Problem
Mathematical
Model
(python)
Solution
Modeling Algorithm
Interpretation
minimize f0(x)
subject to:
fi(x) <= 0
hi(x) = 0
X = (X0, X1, X2 … Xn)
F0(x), Rn  R objective function
hi(x), Rn  R, i = 1, …, m, constraint function
Convex
Non Convex
z = x2 + y2
• Derivative: Measures the sensitivity to change of the function value
(output value) with respect to a change in it’s argument (input value).
• Gradient: is a multi-variable generalization of the derivative. Points in
the direction of greatest increase of a function.
• Jacobian matrix: The first derivative of a vector-values function.
• Hessian matrix: is a square matrix of second-order partial derivative of
a scalar-valued function.
• scipy.optimize: Minimization of scalar function of one or more variables
Linear and Non-linear constraints
• CVXPY: Python-embedded modelling language for convex optimization
problems similar to CVX matlab
• Pyomo: It has it’s own language
• pyOpt: Nonlinear constrained optimization problems
• PuLP: It is used to describe optimization problems as mathematical
models
• Google Optimisation Tools: For solving combinatorial optimization
problems
• Noisyopt,
• Derivative based methods
o It needs to find the derivative of the objective function in away or
another
• Non-derivative based methods
o It does not need to find the derivative
o Based on the evaluation of the objective function, it will be slower
• Constraints or non-constraints methods
• Linear or Non-linear objective functions
• Stochastic and evolutionary based methods
scipy.optimize.minimize(fun, x0, args=(), method=None, jac=None,
hess=None, bounds=None, constraints=(), options=None)
• fun: The objective function
• X0: The initial value
• method: Nelder-Mead(unconstrained, no derivative), Powell
(unconstrained, no derivative), BFGS (unconstrained, gradient based),
Newton-CG(unconstrained, gradient), SLSQP(constrained), ….
• Jac, hess: Jacobian and heasein of the objective function
• bounds: bounds on the search space
• constr: Constraints on the objective functions
• args: To pass values to the objective function
• options: method specific options
Reference: scipy.optimize.minimize documentation
scipy.optimize.minimize(fun, x0, args=(), method=None, jac=None,
hess=None, bounds=None, constraints=(), options=None)
• fun: The objective function
• X0: The initial value
• method: Nelder-Mead(unconstrained, no derivative), Powell
(unconstrained, no derivative), BFGS (unconstrained, gradient based),
Newton-CG(unconstrained, gradient), SLSQP(constrained), ….
• Jac, hess: Jacobian and heasein of the objective function
• bounds: bounds on the search space
• constr: Constraints on the objective functions
• args: To pass values to the objective function
• options: method specific options
Reference: scipy.optimize.minimize documentation
From P-Q
relationship
Profit
Price Quantity
Product-1 18.5 2.58
Product-2 16.82 22.7
Product-3 11.19 30.42
Total 55.7
Profit 338
Proposed Prices and Quantities
Price Quantity
Product-1 15.67 3.6
Product-2 13.73 24.68
Product-3 13.95 22.29
Total 50.56
Profit 253
Last Week Prices and Quantities
• Stochastic Gradient Optimization
• Bayesian optimization​
• ADAM optimization​
• Evolutionary strategies​
• Enforcement learning​
• ……….
Questions and Answers

More Related Content

What's hot

Fairness in AI (DDSW 2019)
Fairness in AI (DDSW 2019)Fairness in AI (DDSW 2019)
Fairness in AI (DDSW 2019)GoDataDriven
 
Responsible AI
Responsible AIResponsible AI
Responsible AINeo4j
 
Generative-AI-Exploring-beyond-the-horizons-possibilities-of-AI-WP.pdf
Generative-AI-Exploring-beyond-the-horizons-possibilities-of-AI-WP.pdfGenerative-AI-Exploring-beyond-the-horizons-possibilities-of-AI-WP.pdf
Generative-AI-Exploring-beyond-the-horizons-possibilities-of-AI-WP.pdfshashanksalunkhe12
 
Machine Learning and the Cloud
Machine Learning and the CloudMachine Learning and the Cloud
Machine Learning and the CloudAndrew Bogard
 
Algorithmic Bias : What is it? Why should we care? What can we do about it?
Algorithmic Bias : What is it? Why should we care? What can we do about it?Algorithmic Bias : What is it? Why should we care? What can we do about it?
Algorithmic Bias : What is it? Why should we care? What can we do about it?University of Minnesota, Duluth
 
Text Analytics Presentation
Text Analytics PresentationText Analytics Presentation
Text Analytics PresentationSkylar Ritchie
 
Introduction to Statistical Machine Learning
Introduction to Statistical Machine LearningIntroduction to Statistical Machine Learning
Introduction to Statistical Machine Learningmahutte
 
Fairness and Bias in Machine Learning
Fairness and Bias in Machine LearningFairness and Bias in Machine Learning
Fairness and Bias in Machine LearningSurya Dutta
 
Use Amazon Comprehend and Amazon SageMaker to Gain Insight from Text
Use Amazon Comprehend and Amazon SageMaker to Gain Insight from TextUse Amazon Comprehend and Amazon SageMaker to Gain Insight from Text
Use Amazon Comprehend and Amazon SageMaker to Gain Insight from TextAmazon Web Services
 
The 7 steps of Machine Learning
The 7 steps of Machine LearningThe 7 steps of Machine Learning
The 7 steps of Machine LearningWaziri Shebogholo
 
Overview on Optimization algorithms in Deep Learning
Overview on Optimization algorithms in Deep LearningOverview on Optimization algorithms in Deep Learning
Overview on Optimization algorithms in Deep LearningKhang Pham
 
Fraud detection with Machine Learning
Fraud detection with Machine LearningFraud detection with Machine Learning
Fraud detection with Machine LearningScaleway
 
Maschinen ohne Gewissen: wenn KI auf Ethik trifft
Maschinen ohne Gewissen: wenn KI auf Ethik trifftMaschinen ohne Gewissen: wenn KI auf Ethik trifft
Maschinen ohne Gewissen: wenn KI auf Ethik trifftOPEN KNOWLEDGE GmbH
 
Machine Learning Tutorial Part - 2 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 2 | Machine Learning Tutorial For Beginners ...Machine Learning Tutorial Part - 2 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 2 | Machine Learning Tutorial For Beginners ...Simplilearn
 
What is Apriori Algorithm | Edureka
What is Apriori Algorithm | EdurekaWhat is Apriori Algorithm | Edureka
What is Apriori Algorithm | EdurekaEdureka!
 
Machine-Learning-A-Z-Course-Downloadable-Slides-V1.5.pdf
Machine-Learning-A-Z-Course-Downloadable-Slides-V1.5.pdfMachine-Learning-A-Z-Course-Downloadable-Slides-V1.5.pdf
Machine-Learning-A-Z-Course-Downloadable-Slides-V1.5.pdfMaris R
 
Machine Learning - Accuracy and Confusion Matrix
Machine Learning - Accuracy and Confusion MatrixMachine Learning - Accuracy and Confusion Matrix
Machine Learning - Accuracy and Confusion MatrixAndrew Ferlitsch
 
Virginia Dignum – Responsible artificial intelligence
Virginia Dignum – Responsible artificial intelligenceVirginia Dignum – Responsible artificial intelligence
Virginia Dignum – Responsible artificial intelligenceNEXTConference
 

What's hot (20)

Fairness in AI (DDSW 2019)
Fairness in AI (DDSW 2019)Fairness in AI (DDSW 2019)
Fairness in AI (DDSW 2019)
 
Responsible AI
Responsible AIResponsible AI
Responsible AI
 
Generative-AI-Exploring-beyond-the-horizons-possibilities-of-AI-WP.pdf
Generative-AI-Exploring-beyond-the-horizons-possibilities-of-AI-WP.pdfGenerative-AI-Exploring-beyond-the-horizons-possibilities-of-AI-WP.pdf
Generative-AI-Exploring-beyond-the-horizons-possibilities-of-AI-WP.pdf
 
Machine Learning and the Cloud
Machine Learning and the CloudMachine Learning and the Cloud
Machine Learning and the Cloud
 
Algorithmic Bias : What is it? Why should we care? What can we do about it?
Algorithmic Bias : What is it? Why should we care? What can we do about it?Algorithmic Bias : What is it? Why should we care? What can we do about it?
Algorithmic Bias : What is it? Why should we care? What can we do about it?
 
Text Analytics Presentation
Text Analytics PresentationText Analytics Presentation
Text Analytics Presentation
 
Introduction to Statistical Machine Learning
Introduction to Statistical Machine LearningIntroduction to Statistical Machine Learning
Introduction to Statistical Machine Learning
 
Fairness and Bias in Machine Learning
Fairness and Bias in Machine LearningFairness and Bias in Machine Learning
Fairness and Bias in Machine Learning
 
Algorithmic fairness
Algorithmic fairnessAlgorithmic fairness
Algorithmic fairness
 
Use Amazon Comprehend and Amazon SageMaker to Gain Insight from Text
Use Amazon Comprehend and Amazon SageMaker to Gain Insight from TextUse Amazon Comprehend and Amazon SageMaker to Gain Insight from Text
Use Amazon Comprehend and Amazon SageMaker to Gain Insight from Text
 
The 7 steps of Machine Learning
The 7 steps of Machine LearningThe 7 steps of Machine Learning
The 7 steps of Machine Learning
 
Overview on Optimization algorithms in Deep Learning
Overview on Optimization algorithms in Deep LearningOverview on Optimization algorithms in Deep Learning
Overview on Optimization algorithms in Deep Learning
 
Fraud detection with Machine Learning
Fraud detection with Machine LearningFraud detection with Machine Learning
Fraud detection with Machine Learning
 
Maschinen ohne Gewissen: wenn KI auf Ethik trifft
Maschinen ohne Gewissen: wenn KI auf Ethik trifftMaschinen ohne Gewissen: wenn KI auf Ethik trifft
Maschinen ohne Gewissen: wenn KI auf Ethik trifft
 
Machine Learning by Rj
Machine Learning by RjMachine Learning by Rj
Machine Learning by Rj
 
Machine Learning Tutorial Part - 2 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 2 | Machine Learning Tutorial For Beginners ...Machine Learning Tutorial Part - 2 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 2 | Machine Learning Tutorial For Beginners ...
 
What is Apriori Algorithm | Edureka
What is Apriori Algorithm | EdurekaWhat is Apriori Algorithm | Edureka
What is Apriori Algorithm | Edureka
 
Machine-Learning-A-Z-Course-Downloadable-Slides-V1.5.pdf
Machine-Learning-A-Z-Course-Downloadable-Slides-V1.5.pdfMachine-Learning-A-Z-Course-Downloadable-Slides-V1.5.pdf
Machine-Learning-A-Z-Course-Downloadable-Slides-V1.5.pdf
 
Machine Learning - Accuracy and Confusion Matrix
Machine Learning - Accuracy and Confusion MatrixMachine Learning - Accuracy and Confusion Matrix
Machine Learning - Accuracy and Confusion Matrix
 
Virginia Dignum – Responsible artificial intelligence
Virginia Dignum – Responsible artificial intelligenceVirginia Dignum – Responsible artificial intelligence
Virginia Dignum – Responsible artificial intelligence
 

Similar to Introduction to Price Optimisation

Python: ottimizzazione numerica algoritmi genetici
Python: ottimizzazione numerica algoritmi geneticiPython: ottimizzazione numerica algoritmi genetici
Python: ottimizzazione numerica algoritmi geneticiPyCon Italia
 
Artificial Intelligence Course: Linear models
Artificial Intelligence Course: Linear models Artificial Intelligence Course: Linear models
Artificial Intelligence Course: Linear models ananth
 
Deploying Data Science for Distribution of The New York Times - Anne Bauer
Deploying Data Science for Distribution of The New York Times - Anne BauerDeploying Data Science for Distribution of The New York Times - Anne Bauer
Deploying Data Science for Distribution of The New York Times - Anne BauerPyData
 
VET4SBO Level 2 module 2 - unit 1 - v1.0 en
VET4SBO Level 2   module 2 - unit 1 - v1.0 enVET4SBO Level 2   module 2 - unit 1 - v1.0 en
VET4SBO Level 2 module 2 - unit 1 - v1.0 enKarel Van Isacker
 
Pragmatic Machine Learning @ ML Spain
Pragmatic Machine Learning @ ML SpainPragmatic Machine Learning @ ML Spain
Pragmatic Machine Learning @ ML SpainLouis Dorard
 
Utah Code Camp 2014 - Learning from Data by Thomas Holloway
Utah Code Camp 2014 - Learning from Data by Thomas HollowayUtah Code Camp 2014 - Learning from Data by Thomas Holloway
Utah Code Camp 2014 - Learning from Data by Thomas HollowayThomas Holloway
 
Linear Programing.pptx
Linear Programing.pptxLinear Programing.pptx
Linear Programing.pptxAdnanHaleem
 
Facebook Talk at Netflix ML Platform meetup Sep 2019
Facebook Talk at Netflix ML Platform meetup Sep 2019Facebook Talk at Netflix ML Platform meetup Sep 2019
Facebook Talk at Netflix ML Platform meetup Sep 2019Faisal Siddiqi
 
DS M1 full - KQB KtuQbank.pdf
DS M1 full - KQB KtuQbank.pdfDS M1 full - KQB KtuQbank.pdf
DS M1 full - KQB KtuQbank.pdfMidhunM83
 
1_Introduction.pptx
1_Introduction.pptx1_Introduction.pptx
1_Introduction.pptxASVKVinayak
 
6 data envelopment_analysis
6 data envelopment_analysis6 data envelopment_analysis
6 data envelopment_analysisFEG
 
Automated Testing of Autonomous Driving Assistance Systems
Automated Testing of Autonomous Driving Assistance SystemsAutomated Testing of Autonomous Driving Assistance Systems
Automated Testing of Autonomous Driving Assistance SystemsLionel Briand
 
linearprogramingproblemlpp-180729145239.pptx
linearprogramingproblemlpp-180729145239.pptxlinearprogramingproblemlpp-180729145239.pptx
linearprogramingproblemlpp-180729145239.pptxKOUSHIkPIPPLE
 
DAA 1 ppt.pptx
DAA 1 ppt.pptxDAA 1 ppt.pptx
DAA 1 ppt.pptxRAJESH S
 

Similar to Introduction to Price Optimisation (20)

Python: ottimizzazione numerica algoritmi genetici
Python: ottimizzazione numerica algoritmi geneticiPython: ottimizzazione numerica algoritmi genetici
Python: ottimizzazione numerica algoritmi genetici
 
Artificial Intelligence Course: Linear models
Artificial Intelligence Course: Linear models Artificial Intelligence Course: Linear models
Artificial Intelligence Course: Linear models
 
Derivative free optimizations
Derivative free optimizationsDerivative free optimizations
Derivative free optimizations
 
Deploying Data Science for Distribution of The New York Times - Anne Bauer
Deploying Data Science for Distribution of The New York Times - Anne BauerDeploying Data Science for Distribution of The New York Times - Anne Bauer
Deploying Data Science for Distribution of The New York Times - Anne Bauer
 
slides.pptx
slides.pptxslides.pptx
slides.pptx
 
VET4SBO Level 2 module 2 - unit 1 - v1.0 en
VET4SBO Level 2   module 2 - unit 1 - v1.0 enVET4SBO Level 2   module 2 - unit 1 - v1.0 en
VET4SBO Level 2 module 2 - unit 1 - v1.0 en
 
OR Ndejje Univ (1).pptx
OR Ndejje Univ (1).pptxOR Ndejje Univ (1).pptx
OR Ndejje Univ (1).pptx
 
OR Ndejje Univ.pptx
OR Ndejje Univ.pptxOR Ndejje Univ.pptx
OR Ndejje Univ.pptx
 
Pragmatic Machine Learning @ ML Spain
Pragmatic Machine Learning @ ML SpainPragmatic Machine Learning @ ML Spain
Pragmatic Machine Learning @ ML Spain
 
Utah Code Camp 2014 - Learning from Data by Thomas Holloway
Utah Code Camp 2014 - Learning from Data by Thomas HollowayUtah Code Camp 2014 - Learning from Data by Thomas Holloway
Utah Code Camp 2014 - Learning from Data by Thomas Holloway
 
Linear Programing.pptx
Linear Programing.pptxLinear Programing.pptx
Linear Programing.pptx
 
Facebook Talk at Netflix ML Platform meetup Sep 2019
Facebook Talk at Netflix ML Platform meetup Sep 2019Facebook Talk at Netflix ML Platform meetup Sep 2019
Facebook Talk at Netflix ML Platform meetup Sep 2019
 
DS M1 full - KQB KtuQbank.pdf
DS M1 full - KQB KtuQbank.pdfDS M1 full - KQB KtuQbank.pdf
DS M1 full - KQB KtuQbank.pdf
 
Optimization Using Evolutionary Computing Techniques
Optimization Using Evolutionary Computing Techniques Optimization Using Evolutionary Computing Techniques
Optimization Using Evolutionary Computing Techniques
 
1_Introduction.pptx
1_Introduction.pptx1_Introduction.pptx
1_Introduction.pptx
 
Regression ppt
Regression pptRegression ppt
Regression ppt
 
6 data envelopment_analysis
6 data envelopment_analysis6 data envelopment_analysis
6 data envelopment_analysis
 
Automated Testing of Autonomous Driving Assistance Systems
Automated Testing of Autonomous Driving Assistance SystemsAutomated Testing of Autonomous Driving Assistance Systems
Automated Testing of Autonomous Driving Assistance Systems
 
linearprogramingproblemlpp-180729145239.pptx
linearprogramingproblemlpp-180729145239.pptxlinearprogramingproblemlpp-180729145239.pptx
linearprogramingproblemlpp-180729145239.pptx
 
DAA 1 ppt.pptx
DAA 1 ppt.pptxDAA 1 ppt.pptx
DAA 1 ppt.pptx
 

Recently uploaded

VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiSuhani Kapoor
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationshipsccctableauusergroup
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz1
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxEmmanuel Dauda
 
Digi Khata Problem along complete plan.pptx
Digi Khata Problem along complete plan.pptxDigi Khata Problem along complete plan.pptx
Digi Khata Problem along complete plan.pptxTanveerAhmed817946
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfMarinCaroMartnezBerg
 
Aminabad Call Girl Agent 9548273370 , Call Girls Service Lucknow
Aminabad Call Girl Agent 9548273370 , Call Girls Service LucknowAminabad Call Girl Agent 9548273370 , Call Girls Service Lucknow
Aminabad Call Girl Agent 9548273370 , Call Girls Service Lucknowmakika9823
 
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...Suhani Kapoor
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptSonatrach
 
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改atducpo
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubaihf8803863
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...soniya singh
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Callshivangimorya083
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...Suhani Kapoor
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...Florian Roscheck
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingNeil Barnes
 

Recently uploaded (20)

VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signals
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptx
 
E-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptxE-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptx
 
Decoding Loan Approval: Predictive Modeling in Action
Decoding Loan Approval: Predictive Modeling in ActionDecoding Loan Approval: Predictive Modeling in Action
Decoding Loan Approval: Predictive Modeling in Action
 
Digi Khata Problem along complete plan.pptx
Digi Khata Problem along complete plan.pptxDigi Khata Problem along complete plan.pptx
Digi Khata Problem along complete plan.pptx
 
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in  KishangarhDelhi 99530 vip 56974 Genuine Escort Service Call Girls in  Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
 
Aminabad Call Girl Agent 9548273370 , Call Girls Service Lucknow
Aminabad Call Girl Agent 9548273370 , Call Girls Service LucknowAminabad Call Girl Agent 9548273370 , Call Girls Service Lucknow
Aminabad Call Girl Agent 9548273370 , Call Girls Service Lucknow
 
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
 
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data Storytelling
 

Introduction to Price Optimisation

  • 1. Price Optimisation with Python Ammar Mohemmed 21/07/2019
  • 2. • In 1985, American Airlines was threatened on its core routes by the low-fare carrier PeopleExpress. In response, American developed an optimisation algorithm to set the prices dynamically • In 2012, the travel site Orbitz was found to be adjusting its prices for users of Apple Mac computers • The Wall Street Journal revealed that the Staples website offered products at different prices depending on the user’s proximity to rival stores
  • 3. • Using data to adjust prices in order to achieve maximum revenue or profit • Price change period from a year to minutes • Single product or multiple products • Considering the substitute from own company and competitors • Considering the laddering (same product but different size or weight or count) • New products with not enough data • Considering other business constraints
  • 4. • Demand: Quantity sold, number of vehicles, no. of passengers … • Law of demand: that other factors being constant (cetris peribus), price and quantity demand of any good and service are inversely related to each other. When the price of a product increases, the demand for the same product will fall. • How to extract possible cofounding variables. • Linear, polynomial or exponential relationship is fitted.
  • 5. Estimate the demand vs price relationship Maximize the revenue by optimization Q = b0 + b1 * P R = (b0 + b1 * P) * P Linear, polynomial or exponential relationship is fitted.
  • 6. • Is a phenomenon in probability and statistics, in which a trend appears in several different groups of data but disappears or reverses when these groups are combined (Wikipedia)
  • 7. Quantity increases with price, but difference of quantity decreases Quantity Quantity vs. price Quantity difference vs. price Quantity difference
  • 8. Objective function: Profit – Q1*(P1-C1) + Q2*(P2-C2) + Q3*(P3-C3) • Variables: P1, P2, P3 • Constraints:  Product-2 price higher than Product-3 by 1  Product-1 higher than its cost by 0.5  Product-1 higher than product-2 by 1.7 • Bounds:  Max price: 50  Min price: product cost
  • 9. • Not considering cross-relationship
  • 10. Any optimization problem has three components: 1. Decision variables 2. The objective function 3. Constraints General Optimisation Problem: • Very difficult to solve • Longer computation time, not always finding the solution • Heuristic optimization methods Exception: • Least square problems • Linear programming problems • Convex optimisation Business Problem Mathematical Model (python) Solution Modeling Algorithm Interpretation minimize f0(x) subject to: fi(x) <= 0 hi(x) = 0 X = (X0, X1, X2 … Xn) F0(x), Rn  R objective function hi(x), Rn  R, i = 1, …, m, constraint function
  • 12. • Derivative: Measures the sensitivity to change of the function value (output value) with respect to a change in it’s argument (input value). • Gradient: is a multi-variable generalization of the derivative. Points in the direction of greatest increase of a function. • Jacobian matrix: The first derivative of a vector-values function. • Hessian matrix: is a square matrix of second-order partial derivative of a scalar-valued function.
  • 13. • scipy.optimize: Minimization of scalar function of one or more variables Linear and Non-linear constraints • CVXPY: Python-embedded modelling language for convex optimization problems similar to CVX matlab • Pyomo: It has it’s own language • pyOpt: Nonlinear constrained optimization problems • PuLP: It is used to describe optimization problems as mathematical models • Google Optimisation Tools: For solving combinatorial optimization problems • Noisyopt,
  • 14. • Derivative based methods o It needs to find the derivative of the objective function in away or another • Non-derivative based methods o It does not need to find the derivative o Based on the evaluation of the objective function, it will be slower • Constraints or non-constraints methods • Linear or Non-linear objective functions • Stochastic and evolutionary based methods
  • 15. scipy.optimize.minimize(fun, x0, args=(), method=None, jac=None, hess=None, bounds=None, constraints=(), options=None) • fun: The objective function • X0: The initial value • method: Nelder-Mead(unconstrained, no derivative), Powell (unconstrained, no derivative), BFGS (unconstrained, gradient based), Newton-CG(unconstrained, gradient), SLSQP(constrained), …. • Jac, hess: Jacobian and heasein of the objective function • bounds: bounds on the search space • constr: Constraints on the objective functions • args: To pass values to the objective function • options: method specific options Reference: scipy.optimize.minimize documentation scipy.optimize.minimize(fun, x0, args=(), method=None, jac=None, hess=None, bounds=None, constraints=(), options=None) • fun: The objective function • X0: The initial value • method: Nelder-Mead(unconstrained, no derivative), Powell (unconstrained, no derivative), BFGS (unconstrained, gradient based), Newton-CG(unconstrained, gradient), SLSQP(constrained), …. • Jac, hess: Jacobian and heasein of the objective function • bounds: bounds on the search space • constr: Constraints on the objective functions • args: To pass values to the objective function • options: method specific options Reference: scipy.optimize.minimize documentation
  • 17.
  • 18. Price Quantity Product-1 18.5 2.58 Product-2 16.82 22.7 Product-3 11.19 30.42 Total 55.7 Profit 338 Proposed Prices and Quantities Price Quantity Product-1 15.67 3.6 Product-2 13.73 24.68 Product-3 13.95 22.29 Total 50.56 Profit 253 Last Week Prices and Quantities
  • 19. • Stochastic Gradient Optimization • Bayesian optimization​ • ADAM optimization​ • Evolutionary strategies​ • Enforcement learning​ • ……….