Skip to contents

Compute the features of a set for a group of index stays

Usage

compute_features(fs, con, stays = NULL, fit = FALSE, address_table = "auto")

Arguments

fs

A feature_set.

con

A DBI connection to an OMOP DuckDB.

stays

Data frame with person_id, admit_date and optionally a unique stay_id; default every inpatient visit. See stays_from_cohort().

fit

TRUE (fit every feature that learns from data: the training reference), a character vector of feature names, or FALSE (use the state already on each feature or loaded with load_feature_state()).

address_table

"auto", a table name, or NULL (see derive_geography_features()).

Value

A data frame with person_id, stay_id, admit_date and every feature column, one row per stay in input order. The fitted state is in attr(, "feature_state") and the manifest in attr(, "feature_provenance").