tidymodels / orbital

Turn Tidymodels Workflows Into Series of Equations
https://orbital.tidymodels.org
Other
18 stars 1 forks source link

out of bounds error in step_pca_sparse() #52

Open EmilHvitfeldt opened 3 months ago

EmilHvitfeldt commented 3 months ago
library(recipes)
library(ggplot2)
library(embed)

data(ad_data, package = "modeldata")

ad_rec <-
  recipe(Class ~ ., data = ad_data) %>%
  step_normalize(all_numeric_predictors()) %>%
  step_pca_sparse(
    all_numeric_predictors()) %>%
  prep()
#> Warning in irlba::ssvd(x = as.matrix(training[, col_names]), k = 5, n = 129L):
#> no sparsity constraints specified

orbital::orbital(ad_rec)
#> Error:
#> ! Failed to evaluate glue component {rot[, i]}
#> Caused by error in `rot[, i]`:
#> ! subscript out of bounds

Created on 2024-07-28 with reprex v2.1.0