Performance
How well does the model do the job it was built for?
- examines
- Task-specific predictive or decision performance.
- keep in mind
- A score on one split says little about data the model has not seen.
Open source, MIT License
Audit machine learning models across performance, robustness, explainability, calibration, data quality, fairness, and complexity — through one extensible Python interface.
Accuracy tells you how often a model is right on one dataset. It does not tell you whether its probabilities can be trusted, whether small changes in the input break it, whether the data was clean, or whether it behaves differently for different groups.
ai-critic looks at those questions one by one and writes the answers into a report you can read, with the limits of each check stated next to its result.
| Model A | Model B | |
|---|---|---|
| Accuracy | 0.91 | 0.91 |
| Calibration error | low | high |
| Under input perturbation | stable | score drops |
| Data quality | clean | duplicates found |
A single metric would rate these two models as equal. An audit would not.
Results come with explanations and limitations, so you can see what a check does not cover.
Meaningful metrics and diagnostics, with reproducible examples and fixed random seeds.
One call fits into existing Python and scikit-learn workflows. No new pipeline to adopt.
You keep your own training code. ai-critic starts after the model is fitted.
Any model you already trained, plus held-out data such as (X_test, y_test).
Set task_type so the audit chooses strategies for your problem instead of assuming a classifier.
Call ai_critic.audit. An optional EvaluationConfig sets cross-validation folds and a random seed for reproducibility.
Read the overall result first, then open each dimension to see what was measured and what was not.
import ai_critic
from ai_critic import EvaluationConfig
report = ai_critic.audit(
model,
(X_test, y_test),
task_type="classification",
evaluation=EvaluationConfig(
cv_folds=5,
random_state=42,
),
)
print(report.overall_score)
print(report.overall_verdict.value)
Each dimension asks one question, states what it examines, and tells you what to keep in mind when reading the result.
How well does the model do the job it was built for?
Does the result survive small changes to the input?
Which inputs drive the model's output?
When the model says 80%, is it right about 80% of the time?
Is the data itself in good shape?
Does behavior differ across groups you name?
How large and costly is the model?
A regression model has no class probabilities. A clustering model has no labels. Instead of treating every model as a classifier, ai-critic picks strategies from task_type and marks a dimension not_applicable when it does not fit.
Each dimension shows its status, its metrics, a plain explanation, and its limitations. Select a row to open it.
An audit is a tool for examining a model. The decision to use it stays with you.
One command installs the package. Then use the example above with your own fitted model.
$python -m pip install ai-critic
Requires Python and a model you have already fitted.
ai-critic is an open-source Python project. Evaluation methods have limits, and discussing them openly makes the tool more honest.
Read how each evaluator works in the repository.
Open an issue with a minimal example.
Propose changes to the API, the reports, or the docs.
Add evaluators and task strategies. Contribution guidelines will be linked once published.
Question the methodology. Clear limits are part of the design.