# Start forecast & training

## Forecast Details

<div data-full-width="true"><figure><img src="https://content.gitbook.com/content/Nyvwhz1kEMXcHf4HLuZ8/blobs/iD05OXHsGP3xh5ubkkNP/forecast%20app%20(4).png" alt=""><figcaption></figcaption></figure></div>

<table data-header-hidden data-full-width="true"><thead><tr><th width="105.79998779296875"></th><th width="220.00003051757812"></th><th></th></tr></thead><tbody><tr><td><strong>Element</strong></td><td><strong>Title</strong></td><td><strong>Details</strong></td></tr><tr><td>[A]</td><td><strong>General Configuration</strong></td><td>Parent block with all settings for the forecast model.</td></tr><tr><td>[A1]</td><td>asset</td><td>The selected asset whose data is used for the forecast.</td></tr><tr><td>[A2]</td><td>Target Attribute</td><td>Attribute for which the prediction is calculated.</td></tr><tr><td>[A3]</td><td>Feature Attributes</td><td>List of additional attributes (minute, hour, day of week …); they serve as input features for the model.</td></tr><tr><td>[A4]</td><td>Forecast length</td><td>Number of time steps forecast into the future.</td></tr><tr><td>[A5]</td><td>Context length</td><td>Length of the historical context window that the model takes into account per prediction.</td></tr><tr><td>[A6]</td><td>start/stop training</td><td>Switch for starting/stopping the training run.</td></tr><tr><td>[A7]</td><td>start/stop forecasting</td><td>Switch for enabling/disabling the ongoing forecast.</td></tr><tr><td>[B]</td><td><strong>Info</strong></td><td>Status panel with runtime information.</td></tr><tr><td>[B1]</td><td>Forecast Status</td><td>Shows whether the forecast is active/inactive and, if active, in which state the forecast is.</td></tr><tr><td>[B2]</td><td>Training Status</td><td>Shows whether training is active/inactive and in which state the training is.</td></tr><tr><td>[B3]</td><td>DOC</td><td>Link to the online documentation of the <em>Forecast</em>app.</td></tr><tr><td>[C]</td><td><strong>Forecast Chart</strong></td><td>Chart with actual and forecast values.</td></tr><tr><td>[C1]</td><td>Legend – actual value</td><td>Marks the measured sensor data (<em>Actual humidity</em>).</td></tr><tr><td>[C2]</td><td>Legend – forecast</td><td>Marks the calculated predictions (<em>Forecast humidity</em>).</td></tr><tr><td>[C3]</td><td>Forecast line</td><td>Shows the forecast as a line in the chart.</td></tr></tbody></table>

## Start forecast & start training

The *Forecast App* allows model training and ongoing forecasting to be activated independently of each other. Both processes run in parallel in the background, but follow different tasks and workflows. The following sections explain how it works, dependencies, and the recommended procedure.

### Start training

**Goal:**\
Trains a new LSTM model based on the currently available historical data.

**Process:**

* The training process is started via the switch **Train \[A6]** .
* The model is trained with the current settings for `forecast_length`, `context_length` and `feature_attributes` .
* During training, the best model each time (measured by the *Validation Loss*) is automatically cached.

**Important:**

* The training status is displayed in the **Info panel** displayed.
* After successful completion, the following message appears:\
  → *Training completed successfully. Waiting for enough data to retrain.*

**Automatic re-train:**\
After the initial training, the model is automatically retrained as soon as at least **10% more data points** are available than in the last run.\
→ Example: If a model was trained on 10 months of data, the next training starts as soon as one more month of data has been added.

***

### Start forecast

**Goal:**\
Creates ongoing predictions for new incoming data points based on the last trained model.

**Process:**

* The forecast is activated via the switch **Forecast \[A7]** .
* The app checks whether a trained model is available. Only then can the prediction begin.
* New forecast values are automatically generated and stored as an attribute in the asset (see[ → *Forecast output attribute*](#ausgabeattribut-des-forecasts)).

**Note:**\
If **no model** is available yet (e.g. after the initial setup), then **no prediction** can be made. In this case, the status shows:\
→ *Waiting for model to be trained.*

***

### Recommended order

To achieve reliable results, it is recommended to:

1. First **start the training**
2. After successful completion, then **activate the forecast**

This avoids initial predictions being based on an untrained or poorly converged model.

***

## Technical terms in the status area

| Term                            | Meaning                                                                                           |
| ------------------------------- | ------------------------------------------------------------------------------------------------- |
| **Epochs**                      | Number of complete training passes over the entire dataset.                                       |
| **Validation Loss (val\_loss)** | Error metric on the validation data. Shows how well the model generalizes. The lower, the better. |

These values help assess the quality of the training process.

***

## Forecast output attribute

When starting the forecast or training process, the *Forecast App* automatically creates a new attribute in the selected asset. This attribute contains the calculated forecast values and is available system-wide.

**Naming scheme:**\
`[target_attribute]_forecast_[forecast_length]`

**Example:**\
If the attribute `temperature` with a `forecast_length` of `12` is forecasted, the name of the automatically created output attribute is:\
→ `temperature_forecast_12`

**Note:**\
This attribute can be used anywhere in Eliona — e.g. in dashboards, rules, visualizations, or the *Calculator*. It behaves like a regular asset attribute and is automatically updated with the latest forecast values.
