gluonts.nursery.spliced_binned_pareto.training_functions module

gluonts.nursery.spliced_binned_pareto.training_functions.eval_on_series(distr_tcn: gluonts.nursery.spliced_binned_pareto.distr_tcn.DistributionalTCN, optimizer: torch.optim.adam.Adam, series_tensor: torch.Tensor, ts_len: int, context_length: int, is_train: bool = False, return_predictions: bool = False, lead_time: int = 1)[source]
Parameters
  • distr_tcn (DistributionalTCN) –

  • otimizer (Optimizer containing parameters, learning rate, etc) –

  • series_tensor (Time series) –

  • ts_len (Length of time series) –

  • context_length (Number of time steps to input) –

  • is_train (True if time series is training set) –

  • return_predictions (True if to return (loss, predictions), False if to return loss only) –

  • lead_time (Number of time steps to predict ahead) –

gluonts.nursery.spliced_binned_pareto.training_functions.highlight_min(data, color='lightgreen')[source]

Highlights the minimum in a Series or DataFrame

gluonts.nursery.spliced_binned_pareto.training_functions.plot_prediction(val_ts_tensor: torch.Tensor, predictions: torch.Tensor, context_length: int, lead_time: int = 1, start: int = 0, end: int = 500, fig: Optional[matplotlib.figure.Figure] = None)[source]
Parameters
  • val_ts_tensor (Time series) –

  • predictions (Prediction series) –

  • context_length (Number of time steps to input) –

  • lead_time (Number of time steps to predict ahead) –

  • start (Index of time series at which to start plotting) –

  • end (Index of time series at which to end plotting) –

gluonts.nursery.spliced_binned_pareto.training_functions.train_step_from_batch(ts_chunks: torch.Tensor, targets: torch.Tensor, distr_tcn: gluonts.nursery.spliced_binned_pareto.distr_tcn.DistributionalTCN, optimizer: torch.optim.adam.Adam)[source]
Parameters
  • ts_chunks (Mini-batch chunked from the time series) –

  • targets (Corresponding chunk of target values) –

  • distr_tcn (DistributionalTCN) –

  • otimizer (Optimizer containing parameters, learning rate, etc) –