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

descriptors with fit_xy #208

Closed
topepo opened this issue Aug 29, 2019 · 0 comments
Closed

descriptors with fit_xy #208

topepo opened this issue Aug 29, 2019 · 0 comments

Comments

@topepo
Copy link
Collaborator

@topepo topepo commented Aug 29, 2019

library(tidymodels)
#> ── Attaching packages ─────────────────────────────────────────────────────────────────────── tidymodels 0.0.2 ──
#> ✔ broom     0.5.2          ✔ purrr     0.3.2     
#> ✔ dials     0.0.2.9001     ✔ recipes   0.1.6.9000
#> ✔ dplyr     0.8.3          ✔ rsample   0.0.5     
#> ✔ ggplot2   3.2.1          ✔ tibble    2.1.3     
#> ✔ infer     0.4.0.1        ✔ yardstick 0.0.3.9000
#> ✔ parsnip   0.0.3.9000
#> ── Conflicts ────────────────────────────────────────────────────────────────────────── tidymodels_conflicts() ──
#> ✖ purrr::discard()  masks scales::discard()
#> ✖ dplyr::filter()   masks stats::filter()
#> ✖ dplyr::lag()      masks stats::lag()
#> ✖ ggplot2::margin() masks dials::margin()
#> ✖ dials::offset()   masks stats::offset()
#> ✖ recipes::step()   masks stats::step()

boost_tree(mode = "regression", mtry = 3) %>% 
  set_engine("xgboost") %>% 
  fit_xy(x = mtcars[, -1], y = mtcars$mpg)
#> parsnip model object
#> 
#> ##### xgb.Booster
#> raw: 11.2 Kb 
#> call:
#>   xgboost::xgb.train(params = list(eta = 0.3, max_depth = 6, gamma = 0, 
#>     colsample_bytree = 0.3, min_child_weight = 1, subsample = 1), 
#>     data = x, nrounds = 15, verbose = 0, objective = "reg:linear", 
#>     nthread = 1)
#> params (as set within xgb.train):
#>   eta = "0.3", max_depth = "6", gamma = "0", colsample_bytree = "0.3", min_child_weight = "1", subsample = "1", objective = "reg:linear", nthread = "1", silent = "1"
#> xgb.attributes:
#>   niter
#> # of features: 10 
#> niter: 15
#> nfeatures : 10

boost_tree(mode = "regression", mtry = .cols()) %>% 
  set_engine("xgboost") %>% 
  fit_xy(x = mtcars[, -1], y = mtcars$mpg)
#> Error in terms.formula(formula, data = data): argument is not a valid model

Created on 2019-08-29 by the reprex package (v0.2.1)

The issue is that the descriptor generator uses get_descr_form() instead of get_descr_xy()

topepo added a commit that referenced this issue Aug 29, 2019
@topepo topepo closed this Aug 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.