Skip to content

add engine docs for bonsai wrappers #721

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

Merged
merged 6 commits into from
May 16, 2022
Merged

add engine docs for bonsai wrappers #721

merged 6 commits into from
May 16, 2022

Conversation

simonpcouch
Copy link
Contributor

The lightgbm docs are pretty thorough, but the partykit docs are mostly barebones / copy+pasted from similar party docs—wanted to give @topepo a chance to drop any notes from implementing those wrappers.

Also potentially fixes a previously documented bug in translate.model_spec.

library(parsnip)
library(bonsai)
library(censored)
#> Loading required package: survival

rand_forest() %>% 
  set_engine("partykit") %>% 
  set_mode("classification") %>% 
  translate()
#> Error in names(args) <- merged$original: 'names' attribute [4] must be the same length as the vector [3]

Created on 2022-05-10 by the reprex package (v2.0.1)

This seems to arise from both bonsai and censored supplying implementations here, with differing metadata (in this case, has_submodel). Dropping duplicated orders makes the length of the results and joined data giving the names equal.

library(parsnip)
library(bonsai)
library(censored)
#> Loading required package: survival

rand_forest() %>% 
  set_engine("partykit") %>% 
  set_mode("classification") %>% 
  translate()
#> Random Forest Model Specification (classification)
#> 
#> Computational engine: partykit 
#> 
#> Model fit template:
#> parsnip::cforest_train(formula = missing_arg(), data = missing_arg(), 
#>     weights = missing_arg())

Created on 2022-05-10 by the reprex package (v2.0.1)

@simonpcouch simonpcouch requested a review from topepo May 10, 2022 19:44
@EmilHvitfeldt EmilHvitfeldt marked this pull request as ready for review May 11, 2022 15:55
@simonpcouch simonpcouch removed the request for review from topepo May 12, 2022 16:38
@topepo topepo merged commit 64e7125 into main May 16, 2022
@topepo topepo deleted the bonsai-docs branch May 16, 2022 15:57
@github-actions
Copy link

This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

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

Successfully merging this pull request may close these issues.

3 participants