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

scaling steps should warn if NaN is returned #1221

Closed
EmilHvitfeldt opened this issue Oct 1, 2023 · 1 comment · Fixed by #1252
Closed

scaling steps should warn if NaN is returned #1221

EmilHvitfeldt opened this issue Oct 1, 2023 · 1 comment · Fixed by #1252
Labels
feature a feature request or enhancement good first issue ❤️ good issue for first-time contributors

Comments

@EmilHvitfeldt
Copy link
Member

Max Approved

library(recipes)

recipe(mpg ~ ., data = mtcars) |>
  step_log(vs) |>
  step_scale(all_predictors()) |>
  prep() |>
  bake(new_data = NULL)
#> # A tibble: 32 × 11
#>      cyl  disp    hp  drat    wt  qsec    vs    am  gear  carb   mpg
#>    <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#>  1  3.36 1.29  1.60   7.29  2.68  9.21   NaN  2.00  5.42 2.48   21  
#>  2  3.36 1.29  1.60   7.29  2.94  9.52   NaN  2.00  5.42 2.48   21  
#>  3  2.24 0.871 1.36   7.20  2.37 10.4    NaN  2.00  5.42 0.619  22.8
#>  4  3.36 2.08  1.60   5.76  3.29 10.9    NaN  0     4.07 0.619  21.4
#>  5  4.48 2.90  2.55   5.89  3.52  9.52   NaN  0     4.07 1.24   18.7
#>  6  3.36 1.82  1.53   5.16  3.54 11.3    NaN  0     4.07 0.619  18.1
#>  7  4.48 2.90  3.57   6.00  3.65  8.86   NaN  0     4.07 2.48   14.3
#>  8  2.24 1.18  0.904  6.90  3.26 11.2    NaN  0     5.42 1.24   24.4
#>  9  2.24 1.14  1.39   7.33  3.22 12.8    NaN  0     5.42 1.24   22.8
#> 10  3.36 1.35  1.79   7.33  3.52 10.2    NaN  0     5.42 2.48   19.2
#> # ℹ 22 more rows
@EmilHvitfeldt EmilHvitfeldt added feature a feature request or enhancement good first issue ❤️ good issue for first-time contributors labels Oct 1, 2023
Copy link

github-actions bot commented Dec 1, 2023

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 Dec 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature a feature request or enhancement good first issue ❤️ good issue for first-time contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant