Results
skforecast_ai.schemas.results ¶
Classes:
| Name | Description |
|---|---|
RenderedScript |
Structured representation of a rendered forecasting script. |
CodeGenerationResult |
Result of the |
ForecastResult |
Result of the |
BacktestResult |
Result of the |
AskResult |
Result of the |
Classes¶
RenderedScript ¶
Bases: BaseModel
Structured representation of a rendered forecasting script.
Splits the rendered script into logical sections so that
forecast() can exec the core logic while forecast_code()
returns the full standalone script.
Attributes:
| Name | Type | Description |
|---|---|---|
imports |
str
|
Import statements required by the script. |
data_loading |
str
|
Code that loads data from CSV and sets up the index. |
core |
str
|
Core execution logic (preprocessing, split, fit, predict,
metrics). Operates on a pre-existing |
CodeGenerationResult ¶
Bases: DisplayMixin, BaseModel
Result of the forecast_code workflow.
Attributes:
| Name | Type | Description |
|---|---|---|
profile |
ForecastingProfile
|
Profile of the input dataset and high-level modeling decisions. |
plan |
ForecastPlan
|
Detailed forecasting plan. |
code |
str
|
Generated Python script. |
ForecastResult ¶
Bases: DisplayMixin, BaseModel
Result of the forecast workflow (executes the pipeline end-to-end).
Attributes:
| Name | Type | Description |
|---|---|---|
profile |
ForecastingProfile
|
Profile of the input dataset and high-level modeling decisions. |
plan |
ForecastPlan
|
Detailed forecasting plan that was executed. |
code |
str
|
Generated Python script equivalent to the execution. |
metrics |
pandas DataFrame, None
|
Evaluation metrics. DataFrame with columns
|
predictions |
pandas DataFrame
|
Forecasted values for the requested steps. When prediction intervals (or quantiles) are requested, the corresponding bound columns are included alongside the point predictions. |
Attributes¶
model_config
class-attribute
instance-attribute
¶
model_config = ConfigDict(arbitrary_types_allowed=True)
Functions¶
_rich_body ¶
_rich_body(console, options)
Source code in skforecast_ai/schemas/results.py
118 119 120 121 122 123 124 125 | |
BacktestResult ¶
Bases: DisplayMixin, BaseModel
Result of the backtest workflow.
Attributes:
| Name | Type | Description |
|---|---|---|
profile |
ForecastingProfile
|
Profile of the input dataset and high-level modeling decisions. |
plan |
ForecastPlan
|
Detailed forecasting plan that was executed. |
cv_config |
dict
|
Resolved |
metrics |
pandas DataFrame
|
Backtesting metric values returned by skforecast. |
predictions |
pandas DataFrame
|
Full backtest predictions across all folds. |
code |
str
|
Generated Python script reproducing the backtesting workflow. |
explanation |
str
|
Human-readable explanation of the backtesting configuration and results summary. |
Attributes¶
model_config
class-attribute
instance-attribute
¶
model_config = ConfigDict(arbitrary_types_allowed=True)
Functions¶
_rich_body ¶
_rich_body(console, options)
Source code in skforecast_ai/schemas/results.py
161 162 163 164 165 166 167 168 169 | |
AskResult ¶
Bases: DisplayMixin, BaseModel
Result of the ask workflow (requires LLM).
Attributes:
| Name | Type | Description |
|---|---|---|
profile |
ForecastingProfile, default None
|
Profile of the input dataset and high-level modeling decisions, if data was provided. |
plan |
ForecastPlan, default None
|
Detailed forecasting plan, if the agent produced one. |
code |
str, default None
|
Generated Python script, if the agent produced one. |
explanation |
str
|
LLM-generated explanation or response. |