Learn R Programming

PatientLevelPrediction (version 6.6.0)

createSklearnIterativeImputer: Create scikit-learn Iterative Imputer settings

Description

This function creates settings for a dense iterative imputer powered by scikit-learn's IterativeImputer through reticulate.

Usage

createSklearnIterativeImputer(
  missingThreshold = 0.3,
  methodSettings = list(),
  addMissingIndicator = FALSE
)

Value

The settings for the sklearn iterative imputer of class featureEngineeringSettings

Arguments

missingThreshold

The threshold for missing values to remove a feature

methodSettings

A list of settings for sklearn IterativeImputer. Supported settings are:

  • maxIter

  • tol

  • samplePosterior

  • nNearestFeatures

  • initialStrategy

  • imputationOrder

  • skipComplete

  • randomState

  • minValue

  • maxValue

addMissingIndicator

Add a binary missingness indicator per feature that passes the imputation missingness threshold.

Examples

Run this code
 # dontrun reason: requires python and scikit-learn 
if (FALSE) {
createSklearnIterativeImputer(
  missingThreshold = 0.3,
  methodSettings = list(maxIter = 5, nNearestFeatures = 20)
)
}

Run the code above in your browser using DataLab