actableai.timeseries.dataset.AAITimeSeriesDataset(dataframes: Union[pandas.core.frame.DataFrame, pandas.core.series.Series, List[pandas.core.frame.DataFrame], Dict[str, pandas.core.frame.DataFrame]], target_columns: List[str], freq: Optional[str] = None, prediction_length: int = 0, training: bool = True, group_by: Optional[List[str]] = None, date_column: Optional[str] = None, feature_columns: Optional[Union[str, List[str]]] = None, feat_dynamic_real: Optional[List[str]] = None, feat_dynamic_cat: Optional[List[str]] = None, feat_static_real: Optional[List[str]] = None, feat_static_cat: Optional[List[str]] = None, seasonal_periods: Optional[List[int]] = None)¶Bases: object
GluonTS-compatible custom class to store a time series dataset.
clean_features(keep_feat_static_real: bool, keep_feat_static_cat: bool, keep_feat_dynamic_real: bool, keep_feat_dynamic_cat: bool) actableai.timeseries.dataset.AAITimeSeriesDataset¶Filter out features from dataset.
Filtered Dataset.
group_list: List[Tuple[Any, ...]]¶Returns the list of group in the dataset.
slice_data(slice_df: Optional[Union[slice, Callable]], copy: bool = False) actableai.timeseries.dataset.AAITimeSeriesDataset¶Slice dataset.
The sliced dataset.
actableai.timeseries.forecast.AAITimeSeriesForecast(forecast: gluonts.model.forecast.Forecast, transformation_func: Optional[Callable[[numpy.ndarray], numpy.ndarray]] = None)¶Bases: gluonts.model.forecast.Forecast
Custom wrapper around GluonTS Forecast.
copy_aggregate(agg_fun: Callable) actableai.timeseries.forecast.AAITimeSeriesForecast¶copy_dim(dim: int) actableai.timeseries.forecast.AAITimeSeriesForecast¶Returns a new Forecast object with only the selected sub-dimension.
dim() int¶Returns the dimensionality of the forecast object.
info: Optional[Dict]¶item_id: Optional[str]¶mean: numpy.ndarray¶Mean of the forecast.
prediction_length: int¶quantile(q: Union[float, str]) numpy.ndarray¶Computes a quantile from the predicted distribution.
start_date: pandas._libs.tslibs.period.Period¶to_dataframe(target_columns: List[str], date_list: List[datetime.datetime], quantiles: List[float] = [0.05, 0.5, 0.95]) pandas.core.frame.DataFrame¶Convert GluonTS forecast to pandas DataFrame.
Forecasted values as pandas DataFrame.
actableai.timeseries.utils.find_freq(pd_date: pandas.core.series.Series, period: int = 10) Optional[str]¶Find the frequency from a list of datetime. :param pd_date: List of datetime as a pandas Series, needs to be sorted. :param period: Window to look for when computing the frequency.
actableai.timeseries.utils.find_gluonts_freq(pd_date: pandas.core.series.Series, freq: str) str¶Convert pandas frequency to GluonTS frequency.
GluonTS frequency.
actableai.timeseries.utils.get_satisfied_formats(row: pandas.core.series.Series, unique_formats: List[str]) List[str]¶Find the datetime formats compatible with a list of datetime.
List of compatible formats.
actableai.timeseries.utils.handle_datetime_column(series: pandas.core.series.Series, min_parsed_rate: float = 0.5) Tuple[pandas.core.series.Series, str]¶Parse datetime from a list of datetime.
actableai.timeseries.utils.interpolate(df: pandas.core.frame.DataFrame, freq: str) pandas.core.frame.DataFrame¶Interpolate missing values in time series.
Interpolated new DataFrame
actableai.timeseries.utils.parse_by_format_with_valid_frequency(series: pandas.core.series.Series, formats: List[str]) pandas.core.series.Series¶Parse datetime using a list of formats. Returns the first working format.
Parsed list of datetime.
actableai.timeseries.utils.parse_datetime(dt_str: pandas.core.series.Series, formats: List[str]) Optional[pandas.core.series.Series]¶Try to parse datetime using a list of formats. Returns the first working format.
Parsed list of datetime or None if no formats are compatible.