linear-regression — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited linear-regression (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.
Use for continuous outcome prediction or explanation where interpretability matters. Triggers:
For binary outcomes use logistic-regression. For time-to-event use survival-analysis. For pure prediction with non-linear effects, fit linear first as baseline, then suggest gradient boosting.
| Input | Why it matters |
|---|---|
| Continuous target | What you're predicting (numeric, ideally not heavily skewed) |
| Feature set | Predictors |
| Observation grain | Per user / per session / per geography |
| Train/test strategy | Temporal split for production, random for exploratory |
| Goal | Pure prediction, coefficient interpretation, or both? |
data-quality-audit skill). import matplotlib.pyplot as plt
df[target].hist(bins=50)
df[target].describe()log(1 + target) transformationstatsmodels for coefficient inference, sklearn for production fitting.# Linear Regression: <outcome>
## Setup
- Outcome: <target> (unit: <e.g., dollars per user>)
- Distribution: mean <X>, median <Y>, p99 <Z> (transformation: <none | log(1+y) | winsorize@p99>)
- Observation unit: <user / session / geo>
- Sample: <N_train> train, <N_test> test (split: <temporal at YYYY-MM-DD | random>)
- Features: <N> features
## Performance (test set)
| Metric | Value | Notes |
|---|---|---|
| RMSE | 18.4 | Target std = 27.1 |
| MAE | 12.1 | |
| R² | 0.47 | |
| R² out-of-time | 0.42 | |
## Coefficients (top by |effect|, standardized)
| Feature | β | SE | t | 95% CI | β std | Interpretation |
|---|---|---|---|---|---|---|
| tenure_months | +1.84 | 0.12 | 15.3 | [+1.60, +2.08] | +0.41 | +1 month → +$1.84 revenue |
| has_team_plan | +24.10 | 1.42 | 16.9 | [+21.3, +26.9] | +0.38 | team plan → +$24.10 revenue |
| device_mobile_pct | -0.32 | 0.04 | -8.0 | [-0.40, -0.24] | -0.18 | 1pp more mobile → -$0.32 revenue |
| ... | | | | | | |
## Diagnostics
- Residuals vs predicted: <looks random | shows funnel pattern (heteroscedasticity) | shows curvature (non-linearity)>
- Q-Q plot: <residuals roughly normal | heavy tails>
- VIF: <max VIF = 3.1 (OK) | max VIF = 12.4 (multicollinearity warning)>
- Autocorrelation: <Durbin-Watson = 1.94 (OK)>
## Caveats
- <e.g., predictions outside the training range of feature X are extrapolation; not reliable>
- <e.g., model assumes effects are linear; non-linear effects detected for feature Y>
- <e.g., R² inflated by 0.07 vs out-of-time R²; mild overfitting>
## Next steps
- <e.g., target seasonal effects with interaction terms>
- <e.g., investigate residual cluster around segment Z>
- <e.g., if pure prediction matters, benchmark vs gradient boosting>cov_type='HC3' in statsmodels).scripts/fit_linear.py — End-to-end OLS fit + diagnostics + report.python scripts/fit_linear.py \
--input data.csv \
--target revenue_per_user \
--features feature_list.txt \
--transform log1p \
--split-by month --split-date 2026-03-01data-quality-audit — run before fittinglogistic-regression — binary outcomescausal-inference — when you need effect estimation, not just associationstakeholder-readout — for packaging the model output~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.