Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where is the place for calculating the score function? #2644

Open
ccylance opened this issue Apr 22, 2024 · 2 comments
Open

Where is the place for calculating the score function? #2644

ccylance opened this issue Apr 22, 2024 · 2 comments

Comments

@ccylance
Copy link

problem: The official website demonstrates how to use the l2 score function to find the best split point. However, when I tried to verify whether my understanding of the formula was correct with a small dataset, I found that the result I got was different from the result shown by the model. So I would like to ask where is the place for calculating the score function used to find the best split point?
I will be very grateful for your reply.

catboost version: catboost 1.2
Operating System: macos 14.4.1
CPU: M1
GPU: no

@ek-ak
Copy link
Collaborator

ek-ak commented Apr 23, 2024

Hello!
These are the places in the code that you are asking for, but I'm not sure if it can be very useful. You can ask your question here.
https://github.com/catboost/catboost/blob/master/catboost/private/libs/algo/score_calcers.h#L76
https://github.com/catboost/catboost/blob/master/catboost/private/libs/algo/leafwise_scoring.cpp#L477

@ccylance
Copy link
Author

@ek-ak Really appreciate for your reply! The l2 score function in the score_calcers.h is calculated by Scores[splitIdx] += leafApprox * leafStats.SumWeightedDelta; which is different with the formula in the Types of score functions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants