preprocessData: A function that wraps around...

View source: R/PreprocessingData.R

preprocessDataR Documentation

A function that wraps around FeatureExtraction::tidyCovariateData to normalise the data and remove rare or redundant features

Description

A function that wraps around FeatureExtraction::tidyCovariateData to normalise the data and remove rare or redundant features

Usage

preprocessData(covariateData, preprocessSettings = createPreprocessSettings())

Arguments

covariateData

The covariate part of the training data created by splitData after being sampled and having any required feature engineering

preprocessSettings

The settings for the preprocessing created by createPreprocessSettings The data processed

Details

Returns an object of class covariateData that has been processed. This includes normalising the data and removing rare or redundant features. Redundant features are features that within an analysisId together cover all obervations.

Value

The covariateData object with the processed covariates

Examples

library(dplyr)
data("simulationProfile")
plpData <- simulatePlpData(simulationProfile, n=1000)
preProcessedData <- preprocessData(plpData$covariateData, createPreprocessSettings())
# check age is normalized by max value
preProcessedData$covariates %>% dplyr::filter(.data$covariateId == 1002)

OHDSI/PatientLevelPrediction documentation built on Feb. 14, 2025, 9:44 a.m.