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

Add CTR conversion for categorical features (with bundling support) #2463

Closed
wants to merge 0 commits into from

Conversation

shiyu1994
Copy link
Collaborator

This version keeps the original categorical split decisions in trees. We will change to pure numerical decisions in trees soon by recording the mappings from categorical values to CTR values in model. The modification so far only handles the ordinary train and prediction process of LightGBM, other functions like ForceSplits requires further check.

@guolinke
Copy link
Collaborator

@shiyu1994 could you resolve the conflict, and provide some benchmark results?

* \param value
* \return whether has value in categorical to bin
*/
inline bool HasValueInCat(double value) const;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems this is not used anymore.

@@ -148,7 +155,7 @@ class BinMapper {
* \param zero_as_missing True to use zero as missing value
*/
void FindBin(double* values, int num_values, size_t total_sample_cnt, int max_bin, int min_data_in_bin, int min_split_data, BinType bin_type,
bool use_missing, bool zero_as_missing);
bool use_missing, bool zero_as_missing, bool use_ctr);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove use_ctr

@guolinke
Copy link
Collaborator

@shiyu1994 could you rewrite this when have time?

@shiyu1994
Copy link
Collaborator Author

@shiyu1994 could you rewrite this when have time?

Ok. I will rewrite it for the latest version of master branch.

@shiyu1994
Copy link
Collaborator Author

Replaced by Pull Request #3234

@guolinke guolinke mentioned this pull request Aug 10, 2020
10 tasks
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants