Skip to contents

Alternative task for predicting ICU mortality using eICU-CRD dataset with different feature encoding. Uses diagnosis strings and treatment information instead of ICD codes and physical exams.

Details

Similar to MortalityPredictionEICU but uses:

  • conditions: Admission diagnoses paths and diagnosis strings

  • procedures: Treatment strings

Label definition:

  • Label = 1 if unitdischargestatus == "Expired"

  • Label = 0 otherwise

Super class

RHealth::BaseTask -> MortalityPredictionEICU2

Public fields

task_name

Name of the task.

input_schema

Input schema.

output_schema

Output schema.

Methods


Method new()

Initialize the task.


Method pre_filter()

Pre-filter hook to retain only necessary columns.

Usage

MortalityPredictionEICU2$pre_filter(df)

Arguments

df

A lazy query containing all events.

Returns

A filtered LazyFrame.


Method call()

Process a single patient (ICU stay) to generate samples.

Usage

MortalityPredictionEICU2$call(patient)

Arguments

patient

A Patient object representing a single ICU stay.

Returns

A list of samples.


Method clone()

The objects of this class are cloneable with this method.

Usage

MortalityPredictionEICU2$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

if (FALSE) { # \dontrun{
library(RHealth)

# Load eICU dataset
eicu_ds <- eICUDataset$new(
  root = "/path/to/eicu-crd/2.0",
  tables = c("diagnosis", "treatment", "admissiondx"),
  dev = TRUE
)

# Set mortality prediction task
task <- MortalityPredictionEICU2$new()
sample_ds <- eicu_ds$set_task(task = task)
} # }