Skip to content

Commit

Permalink
separate out sample list
Browse files Browse the repository at this point in the history
  • Loading branch information
tdhock committed Jan 17, 2024
1 parent 9c4749a commit 5973093
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions R/ResamplingVariableSizeTrainCV.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ ResamplingVariableSizeTrainCV = R6::R6Class(
data.dt <- task$data()
data.table(N=nrow(data.dt), row_id=list(1:nrow(data.dt)))
}else task$strata
folds = private$.combine(
lapply(strata$row_id, private$.sample, task = task)
)[order(row_id)]
sample.list <- lapply(strata$row_id, private$.sample, task = task)
folds = private$.combine(sample.list)[order(row_id)]
min_train_data <- self$param_set$values[["min_train_data"]]
if(task$nrow <= min_train_data){
stop(sprintf(
Expand Down

0 comments on commit 5973093

Please sign in to comment.