createRareFeatureRemover {PatientLevelPrediction} | R Documentation |
Create the settings for removing rare features
Description
Create the settings for removing rare features
Usage
createRareFeatureRemover(threshold = 0.001)
Arguments
threshold |
The minimum fraction of the training data that must have a feature for it to be included |
Value
An object of class featureEngineeringSettings
Examples
# create a rare feature remover that removes features that are present in less
# than 1% of the population
rareFeatureRemover <- createRareFeatureRemover(threshold = 0.01)
plpData <- getEunomiaPlpData()
analysisId <- "rareFeatureRemover"
saveLocation <- file.path(tempdir(), analysisId)
results <- runPlp(
plpData = plpData,
featureEngineeringSettings = rareFeatureRemover,
outcomeId = 3,
executeSettings = createExecuteSettings(
runModelDevelopment = TRUE,
runSplitData = TRUE,
runFeatureEngineering = TRUE),
saveDirectory = saveLocation,
analysisId = analysisId)
# clean up
unlink(saveLocation, recursive = TRUE)
[Package PatientLevelPrediction version 6.4.1 Index]