agentleFS
WindcleaverDevWindcleaverDev/regkit/.agents/skills/logistic-regression/SKILL.md

logistic-regression

Skill0 starsChanged 5 months agoMITView on GitHub

Fits a binary logistic regression with statsmodels, produces a LogisticRegressionReport validating against the pack schema, renders a standalone HTML report. Outputs results/report.json (LogisticRegressionReport) and results/report.html. 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. 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…

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. muralidharsoth-tech/andrew-ng-ml-claude-skills★ 40same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository5 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    After fit, run diagnostics for assumption checks adapted to logistic models (log-odds linearity, leverage analysis).

    line 67

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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-seoffHC0–HC3 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

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.