Skip to content

splines2 steps throw empty warning if degree is larger than deg_free #1170

@EmilHvitfeldt

Description

@EmilHvitfeldt
library(recipes)

recipe(~ mpg, data = mtcars) |>
  step_spline_nonnegative(mpg, deg_free = 5, degree = 6) |>
  prep() |>
  bake(new_data = NULL)
#> Warning:
#> # A tibble: 32 × 1
#>      mpg
#>    <dbl>
#>  1  21  
#>  2  21  
#>  3  22.8
#>  4  21.4
#>  5  18.7
#>  6  18.1
#>  7  14.3
#>  8  24.4
#>  9  22.8
#> 10  19.2
#> # ℹ 22 more rows

Created on 2023-07-23 with reprex v2.0.2

Metadata

Metadata

Assignees

Labels

bugan unexpected problem or unintended behavior

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions