Skip to content

Commit

Permalink
Reduce memory usage (#3)
Browse files Browse the repository at this point in the history
* don't save fit lib from cv feat sel

* more permissive r cmd check gha due to orphaned indirect pkg dependency
  • Loading branch information
saraemoore committed Nov 6, 2023
1 parent e0c9ac4 commit da08b2b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ jobs:
- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
error-on: '"error"'
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: SuperSelector
Title: Ensembled Feature Selection using Cross-Validated SuperLearner
Version: 0.1.1
Date: 2023-11-02
Version: 0.1.2
Date: 2023-11-06
Authors@R:
person(given = "Sara",
family = "Moore",
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SuperSelector 0.1.2

- Reduce memory usage of `cvSLFeatureSelector()`

# SuperSelector 0.1.1

- Add citation info.
Expand Down
6 changes: 4 additions & 2 deletions R/select.R
Original file line number Diff line number Diff line change
Expand Up @@ -377,10 +377,12 @@ cvSLFeatureSelector = function(Y, X, family = binomial(), obsWeights = NULL, id
Y = Y, X = X, family = family,
SL.library = unname(SL.library),
method = method[[1]], id = id, verbose = verbose,
control = list(saveFitLibrary = TRUE, trimLogit = trimLogit), # do we really need saveFitLibrary here?
control = list(saveFitLibrary = FALSE, trimLogit = trimLogit),
cvControl = list(V = nFolds["outer"], stratifyCV = stratifyCV, shuffle = shuffle, validRows = validRows),
innerCvControl = list(list(V = nFolds["inner"], stratifyCV = stratifyCV, shuffle = shuffle, validRows = validRows)),
obsWeights = obsWeights, saveAll = TRUE, ...)
obsWeights = obsWeights,
# saveAll = TRUE ensures the "AllSL" element is included in the result, which is required by tidy.CV.SuperLearner()
saveAll = TRUE, ...)

if(weighted&length(method) > 1) {
cvSLres = c(list(cvSLres),
Expand Down

0 comments on commit da08b2b

Please sign in to comment.