yardstick icon indicating copy to clipboard operation
yardstick copied to clipboard

Feature Request: LINEX implementation in yardstick

Open leonhGeis opened this issue 2 years ago • 3 comments

In order to deal with business-like objectives in demand forecasting, it is good practice to use asymmetric metrics. For example, a retailer loses more money, if he underestimates the demand as when he overestimates it.

I wrote a custom asymmetric mse function in yardstick, which I got implemented for untuned models so far.

I am still struggling to implement the so called LINEX (linear exponential loss) function.

In this stackoverflow question, I asked for help. Topepo redirected me to github, to ask for the implementation in yardstick.

Asymmetric loss function could be a good "usp" for the tidymodels framework. Even in python there is no standard implementation available.

leonhGeis avatar Oct 10 '22 15:10 leonhGeis

Hello @leonhGeis 👋

Can you show me then code that you tried to use to implement the LINEX metric, I can help debug it. Also, do you have any links to references for this metric?

EmilHvitfeldt avatar Oct 25 '22 23:10 EmilHvitfeldt

I would love to see what we can do to help with this issue. Currently there isn't much I can do as I'm unable to find any references regarding this metric.

EmilHvitfeldt avatar Feb 08 '23 00:02 EmilHvitfeldt

Hello EmilHvitfeldt, thanks for taking notice again! Finished my first forecast project without use of asymmetric loss functions. However, it might be helpful for future work.

There already exists an implementation in python, so I will consider to use this one, for my future DeepLearning projects: https://github.com/lukovkin/linex-kerashttps://github.com/lukovkin/linex-keras

Furthermore, there is some research going on in this field. Hope this link might help: https://www.hindawi.com/journals/cin/2022/2307911/

lg1000 avatar Feb 08 '23 12:02 lg1000