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

Removed magrittr dependency in callbacks.R (closes #6852) #6855

Merged
merged 1 commit into from
Apr 15, 2021
Merged

Removed magrittr dependency in callbacks.R (closes #6852) #6855

merged 1 commit into from
Apr 15, 2021

Conversation

ReeceGoding
Copy link
Contributor

@ReeceGoding ReeceGoding commented Apr 13, 2021

To close issue #6852, I've removed the magrittr dependency in the relevant documentation. The simple path of replacing each call like xgb.gblinear.history(bst) %>% matplot(type = 'l') with its corresponding matplot(xgb.gblinear.history(bst), type = 'l') was taken. For some calls, I get different results when I run the code before and after this change. However, there is sufficient randomness in said code that I get different results each time that I run it, regardless of any changes.

One thing that definitely has changed is that the plot y-axes now have titles matching the argument that they are called with. For example, where we previously had no titles on our y-axes that were generated using magrittr pipes, we now have something like "xgb.gblinear.history(bst)". If this is undesirable (and I don't see why it would be?), then the most consistent solution is to follow the coef_path <- xgb.gblinear.history(bst) example, which named its y-axis "coef_path" as a side-effect of the assignment just shown.

Also corrected suspected typo: "forld".

Removed magrittr dependency in documentation. The simple path of replacing each call like `xgb.gblinear.history(bst) %>% matplot(type = 'l')` with its corresponding `matplot(xgb.gblinear.history(bst), type = 'l')` was taken. For some calls, I get different results when I run the code before and after this change. However, there is sufficient randomness in said code that I get different results each time that I run it, regardless of any changes.

One thing that definitely has changed is that the plot y-axes now have titles matching the argument that they are called with. For example, where we previously had no titles on our y-axes that were generated using magrittr pipes, we now have something like "xgb.gblinear.history(bst)". If this is undesirable (and I don't see why it would be?), then the most consistent solution is to follow the `coef_path <- xgb.gblinear.history(bst)` example, which named its y-axes coef_path as a side-effect of the assignment just shown.

Also corrected suspected typo: "forld".
Copy link
Member

@trivialfis trivialfis left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks for the PR!

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

Successfully merging this pull request may close these issues.

2 participants