jinlow / forust

A lightweight gradient boosted decision tree package.
https://jinlow.github.io/forust/
Apache License 2.0
56 stars 6 forks source link

[Question] How to interpret model predictions #92

Closed The-Mr-L closed 7 months ago

The-Mr-L commented 7 months ago

Hi :) thank you for sharing!

well this is most likely a stupid question and not particularly related to this project :) but I wonder why the predictions of the example titanic produces values less than 0 and above 1, I would expect a probability between 0-1 :o . I am clearly missing something important here. can you please explain how to interpret the results , I am not completely new to the topic of ML and even Deep Learning, so I feel pretty dumb for asking. I must of forgotten something sadly.

Thanks again, I appreciate it

jinlow commented 7 months ago

Hi! That’s because the predictions are log odds, and not probability. Log odds is output, as that is what is being determined with the logistic objective function. You can convert log odds to probability with the sign kind function 1 / (1 + (-v).exp())

The-Mr-L commented 7 months ago

ah right that makes sense now. thanks for the quick replay. then one last thing if you don't mind, can you enlighten me why is this function not part of the prediction by default I mean there must be a reason for keeping it in log? is it for model evaluation reasons ?

jinlow commented 7 months ago

Hmm, no real reason I suppose. That’s just the raw output of the objective type. Because this package isn’t broken out into separate classifier/regressor classes, I guess it seemed weird to add a transformation to the output that would only apply to one objective function.

The-Mr-L commented 7 months ago

got it :) tanks again, keep up the good work!