You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be awesome to add weighted normalized gini to the set of available metrics for regression. This is useful in insurance when we want to evaluate to performance of a loss cost model. We order the predictions by the predicted "annualized loss cost", but weigh them by the exposure (time the policy actually lasted) to get the actual dollar amount.
Here is some code I use outside tidymodels. It is inspired by the function posted by pimin the kaggle thread. I think he had inverted the sign in the weighted gini, which meant a perfect prediction would get a gini of -0.999 instead of 0.999.
It would be awesome to add weighted normalized gini to the set of available metrics for regression. This is useful in insurance when we want to evaluate to performance of a loss cost model. We order the predictions by the predicted "annualized loss cost", but weigh them by the
exposure
(time the policy actually lasted) to get the actual dollar amount.It is discussed (with code) in the following kaggle on fire peril loss cost https://www.kaggle.com/c/liberty-mutual-fire-peril/discussion/9880
Here is some code I use outside tidymodels. It is inspired by the function posted by
pim
in the kaggle thread. I think he had inverted the sign in the weighted gini, which meant a perfect prediction would get a gini of -0.999 instead of 0.999.the formula is derived from this 2015 blog post: http://blog.nguyenvq.com/blog/2015/09/25/calculate-the-weighted-gini-coefficient-or-auc-in-r/
The text was updated successfully, but these errors were encountered: