| DiseasystoreBase | R Documentation |
This DiseasystoreBase R6 class forms the basis of all feature stores.
It defines the primary methods of each feature stores as well as all of the public methods.
A new instance of the DiseasystoreBase R6 class.
ds_map(named list(character))
A list that maps features known by the feature store to the corresponding feature handlers
that compute the features. Read only.
available_features(character())
A list of available features in the feature store. Read only.
available_observables(character())
A list of available observables in the feature store. Read only.
available_stratifications(character())
A list of available stratifications in the feature store. Read only.
observables_regex(character(1))
A list of available stratifications in the feature store. Read only.
label(character(1))
A human readable label of the feature store. Read only.
source_conn(DBIConnection or file path)
Used to specify where data is located. Read only. Can be DBIConnection or file path depending on the diseasystore.
target_conn(DBIConnection)
A database connection to store the computed features in. Read only.
target_schema(character)
The schema to place the feature store in. Read only. If the database backend does not support schema, the tables will be prefixed with <target_schema>..
start_date(Date)
Study period start. Read only.
end_date(Date)
Study period end. Read only.
min_start_date(Date)
(Minimum)Study period start. Read only.
max_end_date(Date)
(Maximum)Study period end. Read only.
slice_ts(Date or character)
Date or timestamp (parsable by as.POSIXct) to slice the (time-versioned) data on. Read only.
new()Creates a new instance of the DiseasystoreBase R6 class.
DiseasystoreBase$new(
start_date = NULL,
end_date = NULL,
slice_ts = NULL,
source_conn = NULL,
target_conn = NULL,
target_schema = NULL,
verbose = diseasyoption("verbose", self)
)start_date(Date)
Study period start.
end_date(Date)
Study period end.
slice_ts(Date or character)
Date or timestamp (parsable by as.POSIXct) to slice the (time-versioned) data on.
source_conn(DBIConnection or file path)
Used to specify where data is located. Can be DBIConnection or file path depending on the diseasystore.
target_conn(DBIConnection)
A database connection to store the computed features in.
target_schema(character)
The schema to place the feature store in. If the database backend does not support schema, the tables will be prefixed with <target_schema>..
verbose(boolean)
Boolean that controls enables debugging information.
A new instance of the DiseasystoreBase R6 class.
get_feature()Computes, stores, and returns the requested feature for the study period.
DiseasystoreBase$get_feature( feature, start_date = self %.% start_date, end_date = self %.% end_date, slice_ts = self %.% slice_ts )
feature(character)
The name of a feature defined in the feature store.
start_date(Date)
Study period start.
end_date(Date)
Study period end.
slice_ts(Date or character)
Date or timestamp (parsable by as.POSIXct) to slice the (time-versioned) data on.
A tbl_dbi with the requested feature for the study period.
key_join_features()Joins various features from the feature store assuming a primary feature (observable)
that contains keys to witch the secondary features (defined by stratification) are joined.
DiseasystoreBase$key_join_features( observable, stratification = NULL, start_date = self %.% start_date, end_date = self %.% end_date )
observable(character)
The observable to provide data or prediction for.
stratification(list(quosures) or NULL)
Use rlang::quos(...) to specify stratification. If given, expressions in stratification evaluated to give the stratification level.
start_date(Date)
Study period start.
end_date(Date)
Study period end.
A tbl_dbi with the requested joined features for the study period.
clone()The objects of this class are cloneable with this method.
DiseasystoreBase$clone(deep = FALSE)
deepWhether to make a deep clone.
# DiseasystoreBase is mostly used as the basis of other, more specific, classes
# The DiseasystoreBase can be initialised individually if needed.
ds <- DiseasystoreBase$new(source_conn = NULL,
target_conn = DBI::dbConnect(RSQLite::SQLite()))
rm(ds)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.