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 · 1 comment
Closed

descriptors with fit_xy #208

topepo opened this issue Aug 29, 2019 · 1 comment

Comments

@topepo
Copy link
Member

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 as completed Aug 29, 2019
@github-actions
Copy link

github-actions bot commented Mar 8, 2021

This issue 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 Mar 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant