Skip to content

Commit

Permalink
update sparsity low example
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilHvitfeldt committed Jan 21, 2025
1 parent d9e1c5c commit 936c39c
Show file tree
Hide file tree
Showing 2 changed files with 601 additions and 7 deletions.
82 changes: 82 additions & 0 deletions tests/testthat/_snaps/sparsity.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,85 @@
Error in `stats::lm()`:
! correct: x is dense matrix

# id: 7, recipe sparsity: yes, sparsity: low, model support: yes, arg: auto

Code
fit(wf_spec, ames)
Condition
Error in `parsnip::xgb_train()`:
! correct: x is dense matrix

# id: 8, recipe sparsity: yes, sparsity: low, model support: yes, arg: no

Code
fit(wf_spec, ames)
Condition
Error in `parsnip::xgb_train()`:
! correct: x is dense matrix

# id: 9, recipe sparsity: yes, sparsity: low, model support: yes, arg: yes

Code
fit(wf_spec, ames)
Condition
Error in `parsnip::xgb_train()`:
! wrong: x is sparse matrix

# id: 10, recipe sparsity: yes, sparsity: low, model support: no, arg: auto

Code
fit(wf_spec, ames)
Condition
Error in `stats::lm()`:
! correct: x is dense matrix

# id: 11, recipe sparsity: yes, sparsity: low, model support: no, arg: no

Code
fit(wf_spec, ames)
Condition
Error in `stats::lm()`:
! correct: x is dense matrix

# id: 12, recipe sparsity: yes, sparsity: low, model support: no, arg: yes

Code
fit(wf_spec, ames)
Condition
Warning:
`x` is a sparse tibble, but `linear_reg()` with engine "lm" doesn't accept that. Converting to non-sparse.
Error in `stats::lm()`:
! correct: x is dense matrix

# id: 13, recipe sparsity: no, sparsity: high, model support: yes, arg: auto

Code
fit(wf_spec, ames)
Condition
Error in `parsnip::xgb_train()`:
! wrong: x is dense matrix

# id: 16, recipe sparsity: no, sparsity: high, model support: no, arg: auto

Code
fit(wf_spec, ames)
Condition
Error in `stats::lm()`:
! correct: x is dense matrix

# id: 19, recipe sparsity: no, sparsity: low, model support: yes, arg: auto

Code
fit(wf_spec, ames)
Condition
Error in `parsnip::xgb_train()`:
! correct: x is dense matrix

# id: 22, recipe sparsity: no, sparsity: low, model support: no, arg: auto

Code
fit(wf_spec, ames)
Condition
Error in `stats::lm()`:
! correct: x is dense matrix

Loading

0 comments on commit 936c39c

Please sign in to comment.