Tweedie Loss Function
Describing the Tweedie distribution for predictive models
Overview
In this Medium post I discuss the Tweedie distribution and use of the tweedie loss function and how to implement this in Python. When building predictive models, it is not uncommon to observe data with right-skewed distribution and long tail. For example, in a large e-commerce company like Amazon, most users entering the site will likely not make a purchase, and if they do, the value ranges between cents and thousands of dollars. As a consequence we may have oddly shaped “zero-inflated” distributions with a point mass at zero. Under this circumstance, prediction models may not be well trained if loss functions for other distributions (e.g., RMSE for Gaussian distributions) are used.