ForecastFutureUnit
Forecast the steps of the future rows, reading their exogenous values.
The sibling of ForecastHorizonUnit for a run that read exogenous
variables, and a provisional one: the contract cannot declare an optional
input yet (ATOMIZING §5.4), and once it can this folds into that unit with
an optional x_future (RECONCILING_FORECASTING §7.2, decision 2). The
two share the helpers that forecast and check the grid.
dataset holds the future rows PrepareFutureUnit checked, one per
step, and model_input the same rows after the session's final.pkl.
The horizon is their number, and the model reads, from model_input,
the columns it was fitted on. The forecast is published as y_pred, and
dataset goes on unchanged: the saved prediction keeps the exogenous
values it was made with.
Parameters
- exogenous_columns : array, default=
[] - The exogenous columns the model reads, as the session's preprocessing resolved them for the final fit.
Methods
execute(self, ctx: DashAI.back.units.context.ExecutionContext) -> None
ForecastFutureUnitDo the unit's work, reading from and writing to the context.
Parameters
- ctx : ExecutionContext
- The shared execution context.
get_credential(self, name: str)
ConfigObjectResolve a registered credential component by name.
Parameters
- name : str
- Credential component class name (e.g. "HuggingFaceCredential").
Returns
- BaseCredential
- An instance of the requested credential component.
get_schema(cls) -> dict
ConfigObjectGenerates the component related Json Schema.
Returns
- dict
- Dictionary representing the Json Schema of the component.
validate(self, ctx: DashAI.back.units.context.ExecutionContext) -> None
BaseUnitCheck preconditions without executing the unit.
Parameters
- ctx : ExecutionContext
- The shared execution context.
validate_and_transform(self, raw_data: dict) -> dict
ConfigObjectIt takes the data given by the user to initialize the model and returns it with all the objects that the model needs to work.
Parameters
- raw_data : dict
- A dictionary with the data provided by the user to initialize the model.
Returns
- dict
- A validated dictionary with the necessary objects.