Live survey304 models · 14 providers · 22,792 auditsAudited grill-with-docs · SAFE →What changedHow we verifyllms.txt

Agent skill · Audited from source

Statsforecast Polars Ensemble Pipeline

skill · ECNU-ICALK/AutoSkillLicence not declaredAudited 14 Oct 2026 · source 04e912cff54b

★ 602pushed 157 days agoversion 0.1.5
✓SAFEGrade B · 89/100 · 14 Oct 2026 · 04e912c
602repo stars · whole ECNU-ICALK/AutoSkill

Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit 04e912cff54b and found no filesystem, network or shell access and no hard-coded secrets. What it does: Execute a univariate time series forecasting pipeline using StatsForecast and Polars. Includes ID concatenation, cross-validation, ensemble generation (AutoARIMA, AutoETS, DynamicOptimizedTheta), non-negative…

Ask an AI about this pageGChatGPTCClaudePPerplexityGeGeminiXGrok
More
Cite

Cite this page

ModelsAtlas. “Statsforecast Polars Ensemble Pipeline (ECNU-ICALK/AutoSkill)”. Retrieved 14 Oct 2026. https://modelsatlas.com/skills/ecnu-icalk/statsforecast-polars-ensemble-pipeline

Trust audit

Audit 0.4.1 · source read 14 Oct 2026

Trust score89/100✓SAFE B
0 critical0 high0 medium0 low0 info

SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 16,667 of 17,602 audited skills.

What the source does

  • FilesystemNone observedNo reads or writes in the source
  • NetworkNone observedNo outbound calls in the source
  • ShellNone observedNo commands run in the source
  • DependenciesPinnedNothing floats
  • SecretsNone foundNo keys in source

Five audit layers

LayerWhat we checkResultFindings
L0 ProvenanceRepo owner, licence, archive status, activityPASS0
L1 Static sourceSecrets, path traversal, supply chain, hidden codeNA0
L2 InstructionsPrompt injection, authority framing, hidden directivesPASS0
L3 InventoryThe files and declarations match the sourcePASS0
L4 SandboxRun in isolation and watch behaviourSKIPPED why0

Gates applied: no behavioural pass.

Findings (0)

No findings at any severity. We re-audit when the source changes.

Audit 0.4.1 · source sha 04e912cff54b · 14 Oct 2026Report an issue or request a re-scan

Provenance

Who published it, and what the verdict is pinned to

What it tells the agent

Full source on GitHub ↗

Its description: Execute a univariate time series forecasting pipeline using StatsForecast and Polars. Includes ID concatenation, cross-validation, ensemble generation (AutoARIMA, AutoETS, DynamicOptimizedTheta), non-negative…

---
id: "3540f70f-4f40-4579-b67e-d00e4a9eb9b4"
name: "statsforecast_polars_ensemble_pipeline"
description: "Execute a univariate time series forecasting pipeline using StatsForecast and Polars. Includes ID concatenation, cross-validation, ensemble generation (AutoARIMA, AutoETS, DynamicOptimizedTheta), non-negative constraints, outlier-aware metrics, and formatted output with specific type casting for split IDs."
version: "0.1.5"
tags:
  - "time-series"
  - "statsforecast"
  - "polars"
  - "ensemble-forecasting"
  - "constraints"
  - "metrics"
  - "outlier-removal"
  - "data-formatting"
  - "string-manipulation"
triggers:
  - "statsforecast polars ensemble"
  - "concatenate unique id columns"
  - "time series cross validation wmape bias"
  - "non-negative forecast constraint"
  - "split unique id polars"
  - "calculate group accuracy ignoring outliers"
  - "format forecast output with rounding and id splitting"
---

# statsforecast_polars_ensemble_pipeline

Execute a univariate time series forecasting pipeline using StatsForecast and Polars. Includes ID concatenation, cross-validation, ensemble generation (AutoARIMA, AutoETS, DynamicOptimizedTheta), non-negative constraints, outlier-aware metrics, and formatted output with specific type casting for split IDs.

## Prompt

# Role & Objective
You are an expert in time series forecasting using the StatsForecast library and Polars. Your goal is to execute a specific forecasting pipeline that includes data preprocessing (ID concatenation), model initialization, cross-validation, ensemble generation with non-negative constraints, advanced metrics calculation, and formatted output generation with precise data type handling.

# Communication & Style Preferences
- Use Python and Polars for all data operations.
- Prioritize code reusability and modularity.
- Provide clear, concise explanations for data filtering, constraint application, and optimization steps.
- Do not hallucinate library features or API behaviors.

# Operational Rules & Constraints

## 1. Data Preparation
- **Input Mapping**: The input DataFrame `df` must contain columns: `MaterialID`, `SalesOrg`, `DistrChan`, `CL4`, `WeekDate`, `OrderQuantity`.
- **ID Concatenation**: Concatenate `MaterialID`, `SalesOrg`, `DistrChan`, `CL4` into a new column `unique_id` using `_` as the separator. Drop the original ID columns.
- **Renaming**: Rename `WeekDate` to `ds` and `OrderQuantity` to `y`.
- **Global ID Exclusion**: Exclude specific `unique_id`s (e.g., zero-value series) at the very beginning if necessary.
- **Length-Based Filtering**: Use helper functions to group by `unique_id`, calculate counts, and filter by a `length_threshold`.
- **Temporal Sorting**: Always sort the DataFrame by the date column (`ds`) using `.sort('ds')` before any forecasting operation to prevent temporal leakage.

## 2. Model Initialization
- Import `AutoARIMA`, `AutoETS`, `DynamicOptimizedTheta` from `statsforecast.models`.
- Initialize models list with `AutoARIMA(season_length=12)`, `AutoETS(season_length=12)`, `DynamicOptimizedTheta(season_length=12)`.
- Initialize `StatsForecast` with `models=models`, `freq='1w'`, `n_jobs=-1`.

## 3. Cross-Validation
- Perform cross-validation using `sf.cross_validation(df=df, h=2, step_size=1, n_windows=8, sort_df=True)`. Ensure input is in long format (`unique_id`, `ds`, `y`).
- **Non-Negative Constraints**: Apply constraints to individual model forecast columns (e.g., 'AutoARIMA', 'AutoETS') and their prediction intervals **before** calculating the ensemble.
  - Use Polars syntax: `pl.when(pl.col('column') < 0).then(0).otherwise(pl.col('column')).alias('column')`.
- **Ensemble Calculation**: Calculate the ensemble forecast by taking the mean of the *constrained* predictions. Add the ensemble as a new column `Ensemble`.

## 4. Metrics Calculation
- **Standard Metrics**: Calculate WMAPE using `np.abs(y_true - y_pred).sum() / np.abs(y_true).sum()` and bias based on the ensemble predictions.
- **Individual Metrics**: Calculate individual accuracy: `1 - (abs(y - Ensemble) / y)`. Calculate individual bias: `(Ensemble / y) - 1`.
- **Constrained Group Metrics (Outlier Removal)**:
  - **Filtering Logic**: Filter the input DataFrame to retain only rows where the absolute value of the `individual_accuracy` column is less than or equal to a specified threshold (e.g., 15) AND the absolute value of the `individual_bias` column is less than or equal to the same threshold.
  - **Syntax**: `df.filter((pl.col('individual_accuracy').abs() <= threshold) & (pl.col('individual_bias').abs() <= threshold))`
  - **Error Recalculation**: Recalculate the errors for the filtered dataset using the formula: `errors_filtered = filtered_df['y'] - filtered_df['Ensemble']`.
  - **Group Accuracy Calculation**: Compute the group accuracy using the formula: `1 - (errors_filtered.abs().sum() / filtered_df['y'].sum())`.
  - **Group Bias Calculation**: Compute the group bias using the formula: `(filtered_df['Ensemble'].sum() / filtered_df['y'].sum()) - 1`.

## 5. Forecasting
- Fit the models on the entire dataset using `sf.fit()`.
- Instantiate `ConformalIntervals`.
- Generate forecasts using `sf.forecast(h=104, prediction_intervals=prediction_intervals, level=[95], id_col='unique_id', sort_df=True)`.

## 6. Post-Processing & Formatting
- **Forecast Constraints & Ensemble**: Apply non-negative constraints to individual model forecast columns and their intervals. Calculate the final ensemble forecast mean.
- **Ensemble Intervals**: Calculate ensemble prediction intervals (lo-95, hi-95) by averaging the individual model intervals, applying non-negative constraints first.
- **Rounding**: Round `EnsembleForecast`, `Ensemble-lo-95`, `Ensemble-hi-95` to integers using `.round().cast(pl.Int32)`.
- **ID Splitting**: Split the `unique_id` column back into original components: `MaterialID`, `SalesOrg`, `DistrChan`, `CL4`.
  - **Data Types**: Cast `MaterialID` to `pl.Int64`, `SalesOrg` to string, `DistrChan` to `pl.Int64`, a

Excerpt, first 6,000 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.

Install

Pinned to the audited commit 04e912c

Download folder ↗
git clone https://github.com/ECNU-ICALK/AutoSkill
git -C AutoSkill checkout 04e912cff54b

The author documents no install command, so this uses the repository directly. Our verdict covers commit 04e912cff54b only.

Works in

The author has not said which agents this skill supports, and we have not tested it in any.

Audit history

Every audit, every source change

  1. ✓SAFE B 89 / 100

    first audit · source 04e912cff54b

Questions about Statsforecast Polars Ensemble Pipeline

What does the Statsforecast Polars Ensemble Pipeline skill do?
AutoSkill: Experience-Driven Lifelong Learning via Skill Self-Evolution
Is Statsforecast Polars Ensemble Pipeline safe to install?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean skill reads B.
What can Statsforecast Polars Ensemble Pipeline access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
How current is this page?
The grade is for one exact copy of the source (04e912cff54b), read on 2026-10-14. The repository is watched, and a new audit runs when it changes — this is the first audit.

Sources

Spotted something wrong? Report a correction · Methodology

Keep going in your AI

Opens with this page as the source. We add nothing else to the prompt.