juliasilge.com icon indicating copy to clipboard operation
juliasilge.com copied to clipboard

Introducing our new book, Tidy Modeling with R | Julia Silge

Open utterances-bot opened this issue 3 years ago • 11 comments

Introducing our new book, Tidy Modeling with R | Julia Silge

An initial version of the first eleven chapters are available today! Look for more chapters to be released in the near future.

https://juliasilge.com/blog/tidymodels-book/

utterances-bot avatar Jun 23 '21 20:06 utterances-bot

Hello Julia, There is any problem to compare Xgboost with others algorithms using workflowsets package? When I try to do, This is the error: "Error in xgboost::xgb.DMatrix(x, label = y, missing = NA): 'data' has class 'character' and length 8742. 'data' accepts either a numeric matrix or a single filename". When I try to optimize the algorithm alone, this is the error: "Error in subsample/n : non-numeric argument to binary operator". Do you have any suggestion to fix the problem in order to compare it with others algorithms using workflowsets and tidymodels?

guberney avatar Jun 23 '21 20:06 guberney

@guberney I think this may be related to a recent bug 🐛 we fixed in parsnip in tidymodels/parsnip#510. Can you try installing the development version of parsnip via devtools::install_github("tidymodels/parsnip") and seeing if that fixes your problem?

juliasilge avatar Jun 23 '21 20:06 juliasilge

Thank you so much for the answer. I updated all packages as you recommend. Unfortunately Xgboost did not work inside the workflow_map(), I got the same error that I mentioned. But, at least, I got results optimizing the algorithm alone. It may be something with the joint mapping of the models, but it is very strange. I watch all your videos and tutorials, thank you for that great job. May be you consider make a tutorial using workflow_set() with Xgboost and others.

guberney avatar Jun 23 '21 21:06 guberney

@guberney Can you create a reprex (a minimal reproducible example) showing the problem with xgboost and workflowsets, and post it on the workflowsets repo? If you are able to do that, it would be super helpful. Thanks! 🙌

juliasilge avatar Jun 23 '21 21:06 juliasilge

Hello, I fixed the recipe for the workflow to xgboost in this way: step_dummy(all_nominal(), -class, one_hot = TRUE) and after bind_rows() for all workflows, it works. The xgboost does not work in other way. Thank you.

guberney avatar Jun 25 '21 16:06 guberney

@juliasilge Is the print version already available?

ChrisHH avatar Jul 02 '21 15:07 ChrisHH

@ChrisHH No, not at this time. We are still working on the last third of the content, so be on the lookout for that!

juliasilge avatar Jul 02 '21 16:07 juliasilge

Hi, re: model <- stan_glm(formula, data, family = "gaussian", ...)

Does the lm function "stan_glm" require a special library to run in RStudio?

holeman avatar Dec 09 '21 23:12 holeman

I loaded the package ‘rstanarm’ then ran the code in Chap 6

model <- stan_glm(formula, data, family = "gaussian", ...) Error: '...' used in an incorrect context

holeman avatar Dec 09 '21 23:12 holeman

@holeman Do you mean you tried to run that code with formula and data and ...? Those are actually there for documentation purposes to demonstrate the syntax, like it says in the text there in Ch 6, not code to be literally run.

juliasilge avatar Dec 10 '21 00:12 juliasilge

Oh, okay, Julia. Yeah, I was trying to follow code in the book in Rstudio. Thanks for letting me know.

http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Virus-free. www.avg.com http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Thu, Dec 9, 2021 at 4:49 PM Julia Silge @.***> wrote:

@holeman https://github.com/holeman Do you mean you tried to run that code with formula and data and ...? Those are actually there for documentation purposes to demonstrate the syntax, like it says in the text there in Ch 6, not code to be literally run.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/juliasilge/juliasilge.com/issues/35#issuecomment-990461125, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABX7ST4EK2T5ODB4LR4HNVDUQFFB7ANCNFSM47GRSK3Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- Herbert P. Holeman, Ph.D.

holeman avatar Dec 10 '21 01:12 holeman