Saltar al contenido principal

FitFinalForecasterUnit

Unit
DashAI.back.units.FitFinalForecasterUnit

Fit the model a run keeps, with the best parameters, on the whole series.

The metrics come from the backtest; the kept model is the one that forecasts the future, so it has seen everything up to the last step: train, validation and test (D4). It is a fresh instance built from the parameters, not the backtest's.

The grid goes with it (time_grid): its frequency and last date are what turn a forecast's steps into dates when the model is asked to predict (D5). A run that reads exogenous variables fits it on the final cut, which final.pkl made from the whole series, the same fit that transforms the future when predicting.

Methods​

execute(self, ctx: DashAI.back.units.context.ExecutionContext) -> None

Defined on FitFinalForecasterUnit

Do the unit's work, reading from and writing to the context.

Parameters

ctx : ExecutionContext
The shared execution context.

get_credential(self, name: str)

Defined on ConfigObject

Resolve 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

Defined on ConfigObject

Generates the component related Json Schema.

Returns

dict
Dictionary representing the Json Schema of the component.

validate(self, ctx: DashAI.back.units.context.ExecutionContext) -> None

Defined on BaseUnit

Check preconditions without executing the unit.

Parameters

ctx : ExecutionContext
The shared execution context.

validate_and_transform(self, raw_data: dict) -> dict

Defined on ConfigObject

It 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.