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

[R-package] lgb.prepare() and lgb.prepare2() should be simplified #2683

Closed
jameslamb opened this issue Jan 12, 2020 · 2 comments
Closed

[R-package] lgb.prepare() and lgb.prepare2() should be simplified #2683

jameslamb opened this issue Jan 12, 2020 · 2 comments

Comments

@jameslamb
Copy link
Collaborator

Summary

To close this issue, propose a PR that reduces duplicated code in lgb.prepare() and lgb.prepare2().

Motivation

lgb.prepare() and lgb.prepare2() currently contain a lot of duplicated code and could be simplified. For example, some code is duplicated in the data.frame and data.table blocks of those functions, such as this snippet

list_classes <- sapply(data, class)
is_char <- which(list_classes == "character")
is_fact <- c(which(list_classes == "factor"), is_char)
@jameslamb
Copy link
Collaborator Author

Closed in favor of being in #2302. We decided to keep all feature requests in one place.

Welcome to contribute this feature! Please re-open this issue (or post a comment if you are not a topic starter) if you are actively working on implementing this feature.

@jameslamb
Copy link
Collaborator Author

This issue can be considered permanently closed! Now that #3095 has been merged, there is only one such function (lgb.convert()), so this issue is now irrelevant.

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

No branches or pull requests

1 participant