cardea.problem_definition.ProlongedLengthOfStay

class cardea.problem_definition.ProlongedLengthOfStay(t=7)[source]

Defines the problem of length of stay

Predicting whether a patient stayed in the hospital more or less than a week (by default).

Parameters
  • target_label_column_name (str) – The target label of the prediction problem.

  • target_entity (str) – Name of the entity containing the target label.

  • cutoff_time_label (str) – The cutoff time label of the prediction problem.

  • cutoff_entity (str) – Name of the entity containing the cutoff time label.

  • prediction_type (str) – The type of the machine learning prediction.

__init__(t=7)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__([t])

Initialize self.

check_for_missing_values_in_target_label(…)

Checks if there is a missing value in the target label.

check_target_label(entity_set, …)

Checks if target label exists in the entity set.

generate_cutoff_times(es)

Generates cutoff times for the prediction problem.

generate_target_label(es)

Generates target labels in the case of having missing label in the entityset.

unify_cutoff_time_admission_time(es, …)

Process records in the entity that contains cutoff times based on shared days and time.

unify_cutoff_time_discharge_time(es, …)

Process records in the entity that contains cutoff times based on shared days and time.

unify_cutoff_times_days_admission_time(df, …)

Unify records cutoff times based on shared days.

unify_cutoff_times_days_discharge_time(df, …)

Unify records cutoff times based on shared days.

unify_cutoff_times_hours_admission_time(df, …)

Unify records cutoff times based on shared time.

unify_cutoff_times_hours_discharge_time(df, …)

Unify records cutoff times based on shared time.

Attributes

conn

cutoff_entity

cutoff_time_label

prediction_type

target_entity

target_label_column_name

updated_es