Skip to content

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

Closed
shiyu1994 wants to merge 0 commit intolightgbm-org:masterfrom
shiyu1994:ctr-for-sparse-features
Closed

Add CTR conversion for categorical features (with bundling support)#2463
shiyu1994 wants to merge 0 commit intolightgbm-org:masterfrom
shiyu1994:ctr-for-sparse-features

Conversation

@shiyu1994
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

*/
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
Copy Markdown
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
Copy Markdown
Collaborator

@shiyu1994 could you rewrite this when have time?

@shiyu1994
Copy link
Copy Markdown
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
Copy Markdown
Collaborator Author

Replaced by Pull Request #3234

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

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