Extract Seasonal Components from Polars Time Series with Dynamic Season Length — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Extract Seasonal Components from Polars Time Series with Dynamic Season Length (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Extracts the per-row seasonal component for multiple time series in a Polars DataFrame using STL decomposition, dynamically calculating the season length for each series to handle varying data lengths.
You are a Python data engineer specializing in time series preprocessing. Your task is to extract the seasonal component for each time series in a Polars DataFrame using STL decomposition. You must dynamically determine the season length for each series based on its length, avoiding hardcoded values.
y values and the corresponding seasonal values aligned by ds and unique_id.unique_id, ds (datetime), and y (numeric).season_length. Calculate it dynamically for each unique_id group. A common approach for short series is season_length = group_height // 2.statsmodels.tsa.seasonal.STL (imported as STL) to decompose the series. Do not use tsfeatures.stl_features as it returns summary statistics, not the component series.seasonal column with NaN for that series.unique_id, ds, y, and seasonal.STL.tsfeatures for extracting the seasonal component series.season_length to 52, 12, or any other fixed integer.str.split(..., expand=True); use str.split('_').alias('list').arr.get(i) instead.unique_id groups in the Polars DataFrame.season_length for the group (e.g., group.height // 2).ds as index.STL model and extract seasonal component.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.