Time Series usecases

class previsionio.timeseries.TimeSeries(**usecase_info)

Bases: previsionio.usecase_version.ClassicUsecaseVersion

A supervised usecase version, for timeseries data

metric_type

alias of previsionio.metrics.Regression

model_class

alias of previsionio.model.RegressionModel

new_version(description: str = None, dataset: previsionio.dataset.Dataset = None, column_config: previsionio.usecase_config.ColumnConfig = None, time_window: previsionio.timeseries.TimeWindow = None, metric: previsionio.metrics.Regression = None, holdout_dataset: previsionio.dataset.Dataset = None, training_config: previsionio.usecase_config.TrainingConfig = <previsionio.usecase_config.TrainingConfig object>)

Start a time series usecase training to create a new version of the usecase (on the platform): the training configs are copied from the current version and then overridden for the given parameters.

Parameters:
  • description (str, optional) – additional description of the version
  • dataset (Dataset, DatasetImages, optional) – Reference to the dataset object to use for as training dataset
  • column_config (ColumnConfig, optional) – Column configuration for the usecase (see the documentation of the ColumnConfig resource for more details on each possible column types)
  • ( (time_window) – class: .TimeWindow, optional): a time window object for representing either feature derivation window periods or forecast window periods
  • metric (metrics.Regression, optional) – Specific metric to use for the usecase (default: None)
  • holdout_dataset (Dataset, optional) – Reference to a dataset object to use as a holdout dataset (default: None)
  • training_config (TrainingConfig, optional) – Specific training configuration (see the documentation of the TrainingConfig resource for more details on all the parameters)
Returns:

Newly created text similarity usecase version object (new version)

Return type:

TimeSeries

class previsionio.timeseries.TimeWindow(derivation_start: int, derivation_end: int, forecast_start: int, forecast_end: int)

Bases: previsionio.usecase_config.UsecaseConfig

A time window object for representing either feature derivation window periods or forecast window periods.

Parameters:
  • derivation_start (int) – Start of the derivation window (must be < 0)
  • derivation_end (int) – End of the derivation window (must be < 0)
  • forecast_start (int) – Start of the forecast window (must be > 0)
  • forecast_end (int) – End of the forecast window (must be > 0)
exception previsionio.timeseries.TimeWindowException

Bases: Exception