Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.              Upcoming SlideShare
Loading in …5
×

# RMSLE cost function

Described the use of Root Mean Square Logarithmic Error (RMSLE) as cost function in machine learning (ML).
1. What is it?
2. How is it different from RMSE?
3. When to use it?

• Full Name
Comment goes here.

Are you sure you want to Yes No
Your message goes here • Login to see the comments

### RMSLE cost function

1. 1. RMSLE: Cost Function Khor Soon Hin, @neth_6, re:Culture Katerina Malahova, Tokyo ML Gym
2. 2. Machine Learning (ML) Lightning Tour ● Linear Regression in ML ● The role of Cost Function
3. 3. Predicting using ML
4. 4. Linear Regression
5. 5. Best Fit Best fit => Best prediction
6. 6. Best Fit Definition: Graphically
7. 7. Cost Functions Root Mean Squared Error (RMSE) Square to ensure always positive
8. 8. Cost Functions Root Mean Squared Log Error (RMSLE)Root Mean Squared Error (RMSE) prediction actual
9. 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. 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. 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. 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. 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. 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