probcal 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- probcal/__init__.py +55 -0
- probcal/_math.py +715 -0
- probcal/_results.py +233 -0
- probcal/_validation.py +101 -0
- probcal/attribution.py +171 -0
- probcal/base.py +250 -0
- probcal/bayesian.py +255 -0
- probcal/binning.py +202 -0
- probcal/curves.py +204 -0
- probcal/datasets.py +97 -0
- probcal/isotonic.py +178 -0
- probcal/metrics/__init__.py +170 -0
- probcal/metrics/binned.py +173 -0
- probcal/metrics/grade.py +123 -0
- probcal/metrics/regression.py +103 -0
- probcal/metrics/scores.py +136 -0
- probcal/metrics/smooth.py +124 -0
- probcal/offset.py +211 -0
- probcal/parametric.py +323 -0
- probcal/plots.py +184 -0
- probcal/py.typed +0 -0
- probcal/selection.py +174 -0
- probcal/spline.py +198 -0
- probcal/thresholds.py +55 -0
- probcal/vennabers.py +165 -0
- probcal/wrapper.py +295 -0
- probcal-0.1.0.dist-info/METADATA +154 -0
- probcal-0.1.0.dist-info/RECORD +30 -0
- probcal-0.1.0.dist-info/WHEEL +4 -0
- probcal-0.1.0.dist-info/licenses/LICENSE +21 -0
probcal/__init__.py
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"""probcal: universal post-hoc probability calibration for binary classifiers.
|
|
2
|
+
|
|
3
|
+
Methods, metrics, diagnostics, and auditable offsetting — numpy-only.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from . import metrics
|
|
7
|
+
from ._math import expit, logit
|
|
8
|
+
from .attribution import AdjustedAttribution, adjust_attributions
|
|
9
|
+
from .base import BaseCalibrator, UnattainableTargetError
|
|
10
|
+
from .bayesian import BBQCalibrator, ENIRCalibrator
|
|
11
|
+
from .binning import HistogramBinningCalibrator, ScalingBinningCalibrator
|
|
12
|
+
from .curves import calibration_belt, reliability_binned, reliability_loess, reliability_spline
|
|
13
|
+
from .datasets import make_pd_portfolio
|
|
14
|
+
from .isotonic import CenteredIsotonicCalibrator, IsotonicCalibrator
|
|
15
|
+
from .offset import LogitOffset
|
|
16
|
+
from .parametric import BetaCalibrator, PlattCalibrator, TemperatureCalibrator
|
|
17
|
+
from .selection import CalibratorSelector
|
|
18
|
+
from .spline import SplineCalibrator
|
|
19
|
+
from .thresholds import calibrated_bands_to_raw, calibrated_interval_to_raw
|
|
20
|
+
from .vennabers import CrossVennAbersCalibrator, VennAbersCalibrator
|
|
21
|
+
from .wrapper import CalibratedModel
|
|
22
|
+
|
|
23
|
+
__version__ = "0.1.0"
|
|
24
|
+
|
|
25
|
+
__all__: list[str] = [
|
|
26
|
+
"AdjustedAttribution",
|
|
27
|
+
"BBQCalibrator",
|
|
28
|
+
"BaseCalibrator",
|
|
29
|
+
"CalibratedModel",
|
|
30
|
+
"CalibratorSelector",
|
|
31
|
+
"BetaCalibrator",
|
|
32
|
+
"CenteredIsotonicCalibrator",
|
|
33
|
+
"CrossVennAbersCalibrator",
|
|
34
|
+
"ENIRCalibrator",
|
|
35
|
+
"HistogramBinningCalibrator",
|
|
36
|
+
"IsotonicCalibrator",
|
|
37
|
+
"LogitOffset",
|
|
38
|
+
"PlattCalibrator",
|
|
39
|
+
"ScalingBinningCalibrator",
|
|
40
|
+
"SplineCalibrator",
|
|
41
|
+
"TemperatureCalibrator",
|
|
42
|
+
"UnattainableTargetError",
|
|
43
|
+
"VennAbersCalibrator",
|
|
44
|
+
"adjust_attributions",
|
|
45
|
+
"calibrated_bands_to_raw",
|
|
46
|
+
"calibrated_interval_to_raw",
|
|
47
|
+
"calibration_belt",
|
|
48
|
+
"expit",
|
|
49
|
+
"metrics",
|
|
50
|
+
"reliability_binned",
|
|
51
|
+
"reliability_loess",
|
|
52
|
+
"reliability_spline",
|
|
53
|
+
"logit",
|
|
54
|
+
"make_pd_portfolio",
|
|
55
|
+
]
|