SIENTIAPDE-1430: Introduce static_threshold parameter for static window removal.

This parameter allows customizing the threshold (1-1000) used when rem_static_win is enabled, defaulting to 1 if null.
Updates include parameter definition, business rule validation, repository logic for passing the threshold, documentation in README.md and PIPELINE_PARAMS_CHANGELOG.md, and new unit and integration tests.
This commit is contained in:
Bruno Domingues
2025-12-19 15:44:18 -03:00
parent 7cbb7022e5
commit 06571011f2
10 changed files with 174 additions and 3 deletions

View File

@@ -296,6 +296,7 @@ The **TrainModel** workflow orchestrates the complete ML model training pipeline
"lag_train": {"feature1": 0, "feature2": 2},
"lag_val": {"feature1": 0, "feature2": 1},
"rem_static_win": false,
"static_threshold": null,
"low_lim": {"feature1": 0.0, "feature2": 0.0},
"upp_lim": {"feature1": 100.0, "feature2": 100.0},
"window": 10,
@@ -359,6 +360,7 @@ The workflow validates comprehensive business rules beyond type checking:
11. **model_name**: Must be 'Linear Regression' or 'Polynomial Regression'
12. **Polynomial Regression requires Scaler**: Models with degree > 1 must have a scaler to prevent numerical overflow
13. **Linear Regression requires degree 1**: Linear models must have degree = 1
14. **static_threshold**: When `rem_static_win` is true and `static_threshold` has a value, it must be between 1 and 1000 (inclusive). If null, defaults to 1.
### Cleanup Files Workflow (`cleanup_files.py`)
@@ -977,6 +979,7 @@ Test scenarios are defined as JSON files in `docs/test-scenarios/`. Each scenari
| `08-linear-regression-with-limits` | Linear regression with variable limits | `lowLim`/`uppLim` configuration |
| `09-polynomial-degree2-with-scaler-and-lags` | Complete polynomial scenario | Scaler + lags + degree 2 |
| `10-linear-regression-with-ar` | Linear regression with autoregressive variable | `includeAr: true` |
| `11-linear-regression-static-threshold-custom` | Linear regression with custom static threshold | `staticThreshold: 100` |
#### Scenario File Structure
@@ -991,6 +994,7 @@ Test scenarios are defined as JSON files in `docs/test-scenarios/`. Each scenari
"lagTrain": {"feature1": 0, "feature2": 0},
"lagVal": {"feature1": 0, "feature2": 0},
"remStaticWin": false,
"staticThreshold": null,
"lowLim": {},
"uppLim": {},
"window": 0,