You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Poniard is a scikit-learn companion library that streamlines the process of fitting different machine learning models and comparing them.
10
+
Poniard is a scikit-learn companion for **multi-model diagnostics**. Compare models to get oriented, then answer *where they fail, whether differences are real, and what to try next* — then export a plain sklearn object and leave.
11
11
12
-
It can be used to provide quick answers to questions like these:
13
-
14
-
- What is the reasonable range of scores for this task?
15
-
- Is a simple and explainable linear model enough or should I work with forests and gradient boosters?
16
-
- Are the features good enough as is or should I work on feature engineering?
17
-
- How much can hyperparameter tuning improve metrics?
18
-
- Do I need to work on a custom preprocessing strategy?
19
-
20
-
This is not meant to be an end-to-end solution, and you should keep working on your models after you are done with Poniard.
12
+
Not AutoML. Not end-to-end. Every feature earns its place.
21
13
22
14
## Installation
23
15
@@ -40,12 +32,68 @@ from poniard import PoniardClassifier
40
32
X, y = make_classification(n_samples=200, n_features=10, random_state=42)
41
33
42
34
clf = PoniardClassifier()
43
-
clf.setup(X, y) # configure: type inference, preprocessing, pipelines
44
-
# optionally: clf.add_estimators(...), clf.reassign_types(...), etc.
45
35
clf.fit(X, y) # cross-validate all estimators
46
36
clf.get_results() # comparison table
47
37
```
48
38
39
+
## Error analysis — the reason to install
40
+
41
+
`ErrorAnalyzer` answers *where and why* your models fail. Build it from a
42
+
fitted `PoniardClassifier` / `PoniardRegressor` and run the full workflow with
43
+
a single call:
44
+
45
+
```python
46
+
from poniard.error_analysis import ErrorAnalyzer
47
+
48
+
ea = ErrorAnalyzer.from_poniard(clf) # all non-dummy estimators by default
49
+
report = ea.analyze(X, y)
50
+
```
51
+
52
+
The `report` is a structured `ErrorReport` containing:
53
+
54
+
-**`universal_failures`** — samples every model got wrong
55
+
-**`disagreement_set`** — samples where models split (useful for ensembling)
56
+
-**`lift_by_target`** — per class/bin, error rate relative to the global rate
57
+
-**`lift_by_feature`** — per feature value, error rate relative to the global rate
58
+
-**`ranked_errors`** — per estimator, samples sorted by error magnitude
59
+
-**`merged_errors`** — cross-estimator view: frequency and mean error per sample
60
+
-**`summary`** — per estimator: error count, error rate, mean error
Parallelism: P0 first. P1 can start immediately after. P2 depends on similarity + cached preds (partially exists). P3 reads fold scores (exists). P4 is small and can slip between larger phases. P5 last among core so compare/error can support tuned deltas. P6 continuously skims off P1–P4.
0 commit comments