scaffold-preprocessing

Generates a Python preprocessing pipeline for NASA battery SOH prediction with sliding windows and MinMax scaling.

1|Updated Apr 27, 2026
One-click install
npx skills add https://github.com/GSU26SE55/backend --skill scaffold-preprocessing-gsu26se55
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: scaffold-preprocessing
Source: https://github.com/GSU26SE55/backend/tree/main/.claude/skills/dev/ai/scaffold-preprocessing
Command: npx skills add https://github.com/GSU26SE55/backend --skill scaffold-preprocessing-gsu26se55

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, pandas, scikit-learn, joblib.

What problem does it solve? Setting up a correct data preprocessing pipeline for battery State-of-Health (SOH) prediction is error-prone: wrong train/test splits, scaler leakage, and inconsistent seeds silently corrupt model results. This Skill scaffolds a standardized preprocessing module that enforces the NASA battery split convention and prevents data leakage. ## Core Features & Use Cases - Standardized NASA split: Hardcodes train batteries B0005–B0007 and splits B0018 into 70% validation / 30% test by timestep order. - Leakage-safe scaling: Fits MinMaxScaler only on training data, persists it to models/weights/scaler.pkl with version metadata, and provides a load_scaler() function for inference. - Reproducible windowing: Builds sliding windows of 30 timesteps over voltage, current, and temperature features with a fixed seed of 42. - Use Case: A machine learning engineer starting an SOH prediction project runs the scaffold to get a ready-made data/preprocess.py that loads battery CSVs, produces (N, 30, 3) feature arrays, and saves a versioned scaler artifact. ## Quick Start Ask the AI to scaffold the preprocessing pipeline for the NASA dataset, or specify CALCE to get prompted for battery IDs before file generation.

Frequently Asked Questions about scaffold-preprocessing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I preprocess NASA battery data for SOH prediction?▼

Load each battery CSV with cycle, voltage, current, temperature, and capacity columns, compute SOH as capacity divided by 2.0 Ah nominal, then build 30-timestep sliding windows. Split by battery ID: B0005–B0007 for training and B0018 for validation and testing.

How to avoid data leakage when scaling time series features?▼

Fit MinMaxScaler only on the training split, then apply transform to validation and test sets. Never fit on validation or test data, and split by battery ID before any shuffling to prevent information leakage across splits.

What sliding window size works for battery SOH prediction?▼

This pipeline uses a fixed window of 30 timesteps over voltage, current, and temperature, producing input arrays of shape (N, 30, 3) with the SOH label taken at the final timestep of each window.

Can I use this preprocessing pipeline with the CALCE dataset?▼

Yes, but CALCE has no fixed battery ID convention in the template. The Skill prompts for battery IDs and split ratios before generating files, whereas the NASA path uses the hardcoded B0005–B0007 and B0018 split.

Why does scaler version mismatch happen at inference time?▼

The saved scaler artifact includes a version field checked by load_scaler(). A mismatch error means the persisted scaler.pkl was created with a different SCALER_VERSION than the code expects, so regenerate it by rerunning prepare_splits().