gloria.Gloria.load_data#
- Gloria.load_data(toml_path=None, **kwargs)[source]#
Load and configure the time-series input data for fit method.
Reads a .csv-file that must contain at least two columns: a timestamp and a metric column named according to
self.timestamp_nameandself.metric_name, respectively. The timestamp column is converted to a series ofpd.Timestampsand the metric column is cast todtype_kind.- Parameters:
toml_path (Optional[Union[str, Path]], optional) – Path to a TOML file whose
[load_data]section overrides the model defaults. Ignored whenNone.source (Union[str, Path]) – Location of the CSV file to load the input data from. This key must be provided.
dtype_kind (bool, optional) – Desired kind of the metric column as accepted by NumPy (
"u"unsigned int,"i"signed int,"f"float,"b"boolean). If omitted, the metric dtype is cast to float.self (Self)
- Returns:
data – The preprocessed dataframe ready for modelling
- Return type:
Notes
The configuration of the
load_datamethod viasourceanddtype_kindis composed in four layers, each one overriding the previous:Model defaults - the baseline configuration with defaults given above.
Global TOML file - key-value pairs in the
[load_data]table of the TOML file passed toGloria.from_toml()if the current Gloria instance was created this way.Local TOML file - key-value pairs in the
[load_data]table of the TOML file provided fortoml_path.Keyword overrides - additional arguments supplied directly to the method take highest precedence.