recipes
recipes copied to clipboard
Raw polynomial is reported as orthogonal
trafficstars
The Problem
I trained a recipe to be have raw polynomials, but when I print it out, it says it is orthogonal:
Reproducible example
library(tidymodels)
library(tidyverse)
data(biomass, package = "modeldata")
rec <- recipe(
HHV ~ carbon,
data = biomass
)|>
step_poly(carbon,options = list(raw = TRUE))
quadratic <- prep(rec, training = biomass)
quadratic
#head(biomass_tr|>select(carbon))
#head(quadratic$template|>select(starts_with("carbon")))
Session Info:
<html>
<body>
<!--StartFragment-->
R version 4.2.2 (2022-10-31 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19045) Matrix products: default locale: [1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8 [3] LC_MONETARY=English_United States.utf8 LC_NUMERIC=C [5] LC_TIME=English_United States.utf8 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] lubridate_1.9.2 forcats_1.0.0 stringr_1.5.0 readr_2.1.4 [5] tidyverse_2.0.0 yardstick_1.2.0 workflowsets_1.0.1 workflows_1.1.3 [9] tune_1.1.2 tidyr_1.3.0 tibble_3.2.1 rsample_1.2.0 [13] recipes_1.0.8 purrr_1.0.2 parsnip_1.1.1 modeldata_1.2.0 [17] infer_1.0.4 ggplot2_3.4.3 dplyr_1.1.2 dials_1.2.0 [21] scales_1.2.1 broom_1.0.5 tidymodels_1.1.1 loaded via a namespace (and not attached): [1] Rcpp_1.0.10 lattice_0.20-45 listenv_0.9.0 class_7.3-20 [5] digest_0.6.31 ipred_0.9-14 foreach_1.5.2 utf8_1.2.2 [9] parallelly_1.35.0 R6_2.5.1 backports_1.4.1 hardhat_1.3.0 [13] pillar_1.9.0 rlang_1.1.1 rstudioapi_0.15.0 data.table_1.14.6 [17] DiceDesign_1.9 furrr_0.3.1 rpart_4.1.19 Matrix_1.6-0 [21] splines_4.2.2 gower_1.0.1 munsell_0.5.0 compiler_4.2.2 [25] pkgconfig_2.0.3 globals_0.16.2 nnet_7.3-18 tidyselect_1.2.0 [29] prodlim_2023.03.31 codetools_0.2-18 GPfit_1.0-8 fansi_1.0.3 [33] future_1.32.0 tzdb_0.3.0 withr_2.5.0 MASS_7.3-58.1 [37] grid_4.2.2 gtable_0.3.3 lifecycle_1.0.3 magrittr_2.0.3 [41] stringi_1.7.8 future.apply_1.10.0 cli_3.6.1 timeDate_4022.108 [45] ellipsis_0.3.2 lhs_1.1.6 generics_0.1.3 vctrs_0.6.3 [49] lava_1.7.2.1 iterators_1.0.14 tools_4.2.2 glue_1.6.2 [53] hms_1.1.3 parallel_4.2.2 survival_3.4-0 timechange_0.1.1 [57] colorspace_2.0-3
--
> | >
>
<!--EndFragment-->
</body>
</html>
Hello @millermc38 Thanks for reporting!