cardea.problem_definition.Readmission

class cardea.problem_definition.Readmission(t=30)[source]

Defines the problem of readmission.

Predicting whether a patient will revisit the hospital within certain period of time.

Note

The patient visit is considered a readmission if he/she visits the hospital again within 30 days.

The readmission diagnosis does not have to be the same as the initial visit diagnosis, (The patient could be diagnosed of something that is a complication of the initial diagnosis).

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=30)[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