-
Notifications
You must be signed in to change notification settings - Fork 92
Internals bug? will_make_matrix()
returns False
when given a matrix
#786
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
I believe Is that interpretation correct, @topepo? |
Hmm, based on this comment I would assume the intention is to return Lines 120 to 124 in f081091
|
@simonpcouch is right about the intent. It was also designed for data frames so that's why there's no logic to handle vectors. We could do this but would have to know how to name that column (so it feels out of scope for this function). @joeycouse can you give some context on where this has come up? |
@topepo this is comes up when there is a call to > reg_fit <-
+ boost_tree(trees = 10, mode = "regression") %>%
+ set_engine("xgboost",
+ eval_metric = "mae",
+ verbose = 1) %>%
+ fit(mpg ~ ., data = mtcars) This is an issue because the call to Lines 137 to 155 in e1eb30a
|
Given that we've confirmed that the function, as it's currently scoped, works as intended, and we've closed the PR that prompted the proposed extension in scope, I'm going to go ahead and close this issue. |
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. |
Hello, I'm working on a PR to address #765. While doing so I ran into an issue with
will_make_matrix()
. Shouldn't the return value be True ify
is a matrix or a vector?When
y
is a numeric matrix it fails this check and converts it to a vector. This is stripping the colname ofy
whenever it is passed to function later down the line such asxgb_train()
parsnip/R/convert_data.R
Lines 326 to 336 in f081091
The text was updated successfully, but these errors were encountered: