Skip to content

Commit

Permalink
Merge branch 'develop' into 507-fix-predictCyclopsType
Browse files Browse the repository at this point in the history
  • Loading branch information
egillax committed Dec 4, 2024
2 parents 1d04902 + 4c7dddd commit fe69115
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions R/Sampling.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
#'
#' @param type (character) Choice of: \itemize{
#' \item 'none' No sampling is applied - this is the default
#' \item 'underSample' Undersample the non-outcome class to make the data more ballanced
#' \item 'underSample' Undersample the non-outcome class to make the data more balanced
#' \item 'overSample' Oversample the outcome class by adding in each outcome multiple times
#' }
#' @param numberOutcomestoNonOutcomes (numeric) An numeric specifying the require number of non-outcomes per outcome
#' @param numberOutcomestoNonOutcomes (numeric) A numeric specifying the required number of outcomes per non-outcomes
#' @param sampleSeed (numeric) A seed to use when splitting the data for reproducibility (if not set a random number will be generated)
#'
#' @return
Expand All @@ -44,6 +44,10 @@ createSampleSettings <- function(type = 'none',
stop('Incorrect type. Pick: none/underSample/overSample')
}

if(type %in% c('underSample', 'overSample')){
ParallelLogger::logWarn('The previous documentation for `numberOutcomestoNonOutcomes` used to not reflect the functionality and has now been changed. The user needs to make sure the code is not relying on what was in the docs previously.')
}

sampleSettings <- list(
numberOutcomestoNonOutcomes = numberOutcomestoNonOutcomes,
sampleSeed = ifelse(type == 'none', 1, sampleSeed) # to make it the same for none
Expand Down
4 changes: 2 additions & 2 deletions man/createSampleSettings.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fe69115

Please sign in to comment.