agentsclimarketplace

Logistic regression

Skill WindcleaverDev/regkit/.agents/skills/logistic-regression

Statistically rigorous regression skills for Claude — Python computes, the model narrates.

Install
npx -y skills add WindcleaverDev/regkit --skill logistic-regression

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.9 KB, as published. Nobody here has run it

logistic-regression

Fits a binary logistic regression with statsmodels, produces a LogisticRegressionReport validating against the pack schema, renders a standalone HTML report.

When to use

  • Target has exactly two distinct values (0/1, yes/no, true/false, two category names)
  • User asks for logistic regression, "model a binary outcome", "predict yes/no"
  • pre-analysis identified the target as binary
  • User wants odds ratios or predicted probabilities, not just coefficient signs

Quick start

python .agents/skills/logistic-regression/scripts/fit.py \
    --data path/to/data.csv \
    --target churned \
    --positive-class yes \
    --features tenure,monthly_charges,contract_type \
    --output results/

Outputs results/report.json (LogisticRegressionReport) and results/report.html.

Arguments

FlagDefaultDescription
--datarequiredCSV or Parquet path
--targetrequiredBinary target column (exactly 2 unique values)
--positive-classautoWhich value to treat as 1 (default: 1 if 0/1 numeric, else alphabetically last)
--featuresrequiredComma-separated columns, or all
--outputrequiredOutput directory
--robust-seoffHC0HC3 robust standard errors
--threshold0.5Classification decision threshold
--dataset-name""Label shown in report header

Outputs

out/
├── report.json   # LogisticRegressionReport (Pydantic schema)
└── report.html   # Self-contained HTML with Plotly charts

Report sections

  1. Fit summary — AUC, Brier score, McFadden pseudo-R², AIC/BIC, positive rate
  2. Marginal effects — AME forest plot + table (the primary interpretation surface)
  3. Coefficients — log-odds table + odds ratio forest plot (log scale)
  4. Classification performance — confusion matrix, accuracy, balanced accuracy, F1
  5. ROC curve — AUC annotated
  6. Calibration — reliability diagram with Brier score
  7. Interpretation — AME-based plain-English facts per feature
  8. Flags & recommendations

Interpreting the output

Lead with marginal effects (AME), not raw log-odds. AME tells you the average change in predicted probability per unit increase in each feature — the quantity humans find most interpretable.

  • AUC 0.5 = random, 0.7 = OK, 0.8 = good, 0.9+ = strong
  • Brier score 0.25 = baseline for balanced classes (lower is better)
  • CLASS_IMBALANCE flag: accuracy is misleading; prefer balanced accuracy and AUC

Chaining

After fit, run diagnostics for assumption checks adapted to logistic models (log-odds linearity, leverage analysis). Or run model-comparison alongside an OLS fit on the same binary target.

References

  • references/odds_ratio_interpretation.md
  • references/marginal_effects.md
  • references/class_imbalance.md
  • references/threshold_choice.md

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.