Skip to content

increase number of vars selected to PCA error #84

Closed

Description

@EmilHvitfeldt

We can "fix" this by splitting the PCA expressions over multiple lines like

# before
PCA1 = 1 + 2 + 3 + 4 + 5

# after
PCA1 = 1 + 2 + 3 
PCA1 = PCA1 + 4 + 5

reprex:

library(tidymodels)
library(orbital)

rec <- recipe(Sale_Price ~ ., data = ames |> select(Sale_Price, 1:50)) |>
  step_unknown(all_nominal_predictors()) |>
  step_impute_mean(all_numeric_predictors()) |>
  step_dummy(all_nominal_predictors()) |>
  step_zv(all_numeric_predictors()) |>
  step_scale(all_numeric_predictors()) |>
  step_center(all_numeric_predictors()) |>
  step_pca(all_numeric_predictors())

rec |> prep()

mod <- linear_reg()

wf_spec <- workflow(rec, mod)

wf_fit <- fit(wf_spec, ames)

orb <- orbital(wf_fit)

library(DBI)
library(RSQLite)

con_sqlite <- dbConnect(SQLite(), path = ":memory:")

orbital_sql(orb, con_sqlite)


Activity

  1. added
    bugan unexpected problem or unintended behavior
    on Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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