phenome_core.core.base.base_dataset module¶
-
class
BaseDataset(record_frequency, period_type, model_classtype, data_model)¶ Bases:
object-
append(rows_list)¶
-
get_aggregated_data(group_by_columns, data_columns, period, estimate_if_incomplete)¶
-
get_column_stats(data_columns, prediction_outputs)¶
-
get_data(data_columns, period_start_ms, period_end_ms, object_id_filter, object_model_id_filter=None, period_id=None, predicted=None)¶
-
get_estimated_sample_count(period)¶
-
get_memory_usage()¶
-
get_predictions(prediction_id=None, period_id=None, include_current=False)¶
-
get_predictions_by_object(obj_id, period_id=None, include_current=False)¶
-
get_predictions_by_object_id_and_prediction_id(obj_id, prediction_id, period_id=None, include_current=False)¶
-
insert(rows_list)¶
-
is_fully_populated(period)¶
-
update_predictions(prediction_model_id, metrics, predictions, time_period=<_TIME_PERIOD_CODES_.ONE_MINUTE: 1>, timestamp=None)¶ Updates dataframe with a number of predicted values for a single KPI and multiple objects Currently uses the current time
- Parameters
prediction_model_id – The ID of the predictive model
metrics – The KPI(s) being predicted
predictions – dict of predicted values keyed by Object ID
time_period – The _TIME_PERIOD_CODES_ time period ID, defaults to ONE_MINUTE (1)
timestamp – datetime object (specify None for now())
- Returns
None
-
update_values(model_id, kpi, values, time_period=<_TIME_PERIOD_CODES_.ONE_MINUTE: 1>, timestamp=None)¶ Updates dataframe with a number of current values for a single KPI and multiple objects
- Parameters
model_id – The object model_id
kpi – The KPI being collected
values – dict of values keyed by Object ID
time_period – The _TIME_PERIOD_CODES_ time period ID, defaults to ONE_MINUTE (1)
timestamp – datetime object (specify None for now())
- Returns
None
-