SlideShare a Scribd company logo
RMSLE: Cost Function
Khor Soon Hin, @neth_6, re:Culture
Katerina Malahova, Tokyo ML Gym
Machine Learning (ML) Lightning Tour
● Linear Regression in ML
● The role of Cost Function
Predicting using ML
Linear Regression
Best Fit
Best fit => Best prediction
Best Fit Definition: Graphically
Cost Functions
Root Mean Squared Error (RMSE)
Square to ensure always positive
Cost Functions
Root Mean Squared Log Error (RMSLE)Root Mean Squared Error (RMSE)
prediction
actual
Cost Functions
Root Mean Squared Log Error (RMSLE)Root Mean Squared Error (RMSE)
For the same predicted &
actual, RMSE & RMSLE is
same (the blue vertical line)
When predicted and actual is small:
Cost Functions
Root Mean Squared Log Error (RMSLE)Root Mean Squared Error (RMSE)
For the same predicted &
actual, RMSE > RMSLE is
same (the pink vs blue
vertical line)
If either predicted or actual is big:
Cost Functions
Root Mean Squared Log Error (RMSLE)Root Mean Squared Error (RMSE)
For the same predicted &
actual, RMSE > RMSLE is
same (the pink vs blue
vertical line)
NOTE: RMSLE is almost
negligible
If both predicted and actual are big:
Alternative: RMSLE Intuition
RMSLE: log(Pi + 1) - log(Ai +1) = log((Pi + 1)/(Ai +1))
Only the percentual differences matter!
For example for P = 1000 and A = 500 would give you the roughly same error as
when P = 100000 and A = 50000
RMSLE is usually used when you don't want to penalize huge differences in the
predicted and true values when both predicted and true values are huge numbers.
Credits to Katerina Malahova for sharing this
RMSLE Usage
● When prediction error for small prediction is undesirable
● Example:
○ Predict inventory required to fulfill all customers
■ When you are small, you have few customers so ensuring each one is satisfied is more
important missing out a few customers when you are big
○ Kaggle: https://www.kaggle.com/wiki/RootMeanSquaredLogarithmicError
Cost Function
● Purpose:
○ Mathematical definition of best fit
○ ML’s goal is to minimize it
● Usage:
○ Used by ML to determine how to tweak model parameters to get best fit
■ Gradient descent

More Related Content

PDF
Pravilnik o-listi-strucnih-akademskih-i-naucnih-naziva
PPTX
머피의 머신러닝: 17장 Markov Chain and HMM
PPT
introducción a Machine Learning
PDF
Deep learning book_chap_02
PDF
Gentlest Introduction to Tensorflow - Part 3
PPTX
Linear Regression in machine learning.pptx
PPTX
linear regression1.pptx machine learning
PPTX
lec0734523532453425324523452345245432.pptx
Pravilnik o-listi-strucnih-akademskih-i-naucnih-naziva
머피의 머신러닝: 17장 Markov Chain and HMM
introducción a Machine Learning
Deep learning book_chap_02
Gentlest Introduction to Tensorflow - Part 3
Linear Regression in machine learning.pptx
linear regression1.pptx machine learning
lec0734523532453425324523452345245432.pptx

Similar to RMSLE cost function (20)

PPTX
Linear Regression
PPTX
Arjrandomjjejejj3ejjeejjdjddjjdjdjdjdjdjdjdjdjd
PPTX
Linear regression
PPTX
Machine learning session4(linear regression)
PPTX
Model evaluation
PPTX
i just wanted to Your score increases as you pick a categ
PDF
RDataMining slides-regression-classification
PDF
Lecture 2 neural network covers the basic
PPTX
exploring Machine Learning with best way
PDF
Exploring Support Vector Regression - Signals and Systems Project
PDF
SupportVectorRegression
PDF
Lecture 3 - Linear Regression
PDF
Linear Regression
PPTX
5.2 Least Squares Linear Regression.pptx
PPTX
Lecture 8 about data mining and how to use it.pptx
PDF
Lecture 11 linear regression
PDF
Unit2_Linear Regression_Performance Metrics.pdf
PDF
Curve Fitting in Numerical Methods Regression
PPT
Introduction to Machine Learning STUDENTS.ppt
PPTX
08-Regression.pptx
Linear Regression
Arjrandomjjejejj3ejjeejjdjddjjdjdjdjdjdjdjdjdjd
Linear regression
Machine learning session4(linear regression)
Model evaluation
i just wanted to Your score increases as you pick a categ
RDataMining slides-regression-classification
Lecture 2 neural network covers the basic
exploring Machine Learning with best way
Exploring Support Vector Regression - Signals and Systems Project
SupportVectorRegression
Lecture 3 - Linear Regression
Linear Regression
5.2 Least Squares Linear Regression.pptx
Lecture 8 about data mining and how to use it.pptx
Lecture 11 linear regression
Unit2_Linear Regression_Performance Metrics.pdf
Curve Fitting in Numerical Methods Regression
Introduction to Machine Learning STUDENTS.ppt
08-Regression.pptx
Ad

More from Khor SoonHin (7)

PDF
The Many Flavors of OAuth - Understand Everything About OAuth2
PDF
Rails + Webpack
PDF
Gentlest Introduction to Tensorflow - Part 2
PDF
Gentlest Introduction to Tensorflow
PDF
Tokyo React.js #3: Missing Pages: ReactJS/Flux/GraphQL/RelayJS
PDF
Tokyo React.js #3 Meetup (ja): Missing Pages: ReactJS/GraphQL/RelayJS
PDF
From Back to Front: Rails To React Family
The Many Flavors of OAuth - Understand Everything About OAuth2
Rails + Webpack
Gentlest Introduction to Tensorflow - Part 2
Gentlest Introduction to Tensorflow
Tokyo React.js #3: Missing Pages: ReactJS/Flux/GraphQL/RelayJS
Tokyo React.js #3 Meetup (ja): Missing Pages: ReactJS/GraphQL/RelayJS
From Back to Front: Rails To React Family
Ad

Recently uploaded (20)

PPTX
Data_Analytics_and_PowerBI_Presentation.pptx
PPTX
1_Introduction to advance data techniques.pptx
PDF
annual-report-2024-2025 original latest.
PPTX
STUDY DESIGN details- Lt Col Maksud (21).pptx
PDF
TRAFFIC-MANAGEMENT-AND-ACCIDENT-INVESTIGATION-WITH-DRIVING-PDF-FILE.pdf
PPTX
Business Acumen Training GuidePresentation.pptx
PPTX
Introduction to machine learning and Linear Models
PPTX
MODULE 8 - DISASTER risk PREPAREDNESS.pptx
PDF
Galatica Smart Energy Infrastructure Startup Pitch Deck
PPTX
Computer network topology notes for revision
PPTX
01_intro xxxxxxxxxxfffffffffffaaaaaaaaaaafg
PPTX
ALIMENTARY AND BILIARY CONDITIONS 3-1.pptx
PDF
168300704-gasification-ppt.pdfhghhhsjsjhsuxush
PDF
Foundation of Data Science unit number two notes
PPTX
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
PPTX
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
PPTX
Acceptance and paychological effects of mandatory extra coach I classes.pptx
PDF
22.Patil - Early prediction of Alzheimer’s disease using convolutional neural...
PPTX
DISORDERS OF THE LIVER, GALLBLADDER AND PANCREASE (1).pptx
Data_Analytics_and_PowerBI_Presentation.pptx
1_Introduction to advance data techniques.pptx
annual-report-2024-2025 original latest.
STUDY DESIGN details- Lt Col Maksud (21).pptx
TRAFFIC-MANAGEMENT-AND-ACCIDENT-INVESTIGATION-WITH-DRIVING-PDF-FILE.pdf
Business Acumen Training GuidePresentation.pptx
Introduction to machine learning and Linear Models
MODULE 8 - DISASTER risk PREPAREDNESS.pptx
Galatica Smart Energy Infrastructure Startup Pitch Deck
Computer network topology notes for revision
01_intro xxxxxxxxxxfffffffffffaaaaaaaaaaafg
ALIMENTARY AND BILIARY CONDITIONS 3-1.pptx
168300704-gasification-ppt.pdfhghhhsjsjhsuxush
Foundation of Data Science unit number two notes
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
Acceptance and paychological effects of mandatory extra coach I classes.pptx
22.Patil - Early prediction of Alzheimer’s disease using convolutional neural...
DISORDERS OF THE LIVER, GALLBLADDER AND PANCREASE (1).pptx

RMSLE cost function

  • 1. RMSLE: Cost Function Khor Soon Hin, @neth_6, re:Culture Katerina Malahova, Tokyo ML Gym
  • 2. Machine Learning (ML) Lightning Tour ● Linear Regression in ML ● The role of Cost Function
  • 5. Best Fit Best fit => Best prediction
  • 6. Best Fit Definition: Graphically
  • 7. Cost Functions Root Mean Squared Error (RMSE) Square to ensure always positive
  • 8. Cost Functions Root Mean Squared Log Error (RMSLE)Root Mean Squared Error (RMSE) prediction actual
  • 9. Cost Functions Root Mean Squared Log Error (RMSLE)Root Mean Squared Error (RMSE) For the same predicted & actual, RMSE & RMSLE is same (the blue vertical line) When predicted and actual is small:
  • 10. Cost Functions Root Mean Squared Log Error (RMSLE)Root Mean Squared Error (RMSE) For the same predicted & actual, RMSE > RMSLE is same (the pink vs blue vertical line) If either predicted or actual is big:
  • 11. Cost Functions Root Mean Squared Log Error (RMSLE)Root Mean Squared Error (RMSE) For the same predicted & actual, RMSE > RMSLE is same (the pink vs blue vertical line) NOTE: RMSLE is almost negligible If both predicted and actual are big:
  • 12. Alternative: RMSLE Intuition RMSLE: log(Pi + 1) - log(Ai +1) = log((Pi + 1)/(Ai +1)) Only the percentual differences matter! For example for P = 1000 and A = 500 would give you the roughly same error as when P = 100000 and A = 50000 RMSLE is usually used when you don't want to penalize huge differences in the predicted and true values when both predicted and true values are huge numbers. Credits to Katerina Malahova for sharing this
  • 13. RMSLE Usage ● When prediction error for small prediction is undesirable ● Example: ○ Predict inventory required to fulfill all customers ■ When you are small, you have few customers so ensuring each one is satisfied is more important missing out a few customers when you are big ○ Kaggle: https://www.kaggle.com/wiki/RootMeanSquaredLogarithmicError
  • 14. Cost Function ● Purpose: ○ Mathematical definition of best fit ○ ML’s goal is to minimize it ● Usage: ○ Used by ML to determine how to tweak model parameters to get best fit ■ Gradient descent