Skip to content

Commit 7e3c3d4

Browse files
committed
Merge branch 'release/v0.1.6'
2 parents f6ce2c4 + 6fd5e1d commit 7e3c3d4

File tree

17 files changed

+475
-328
lines changed

17 files changed

+475
-328
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.1.5
2+
current_version = 0.1.6
33
commit = False
44
tag = False
55
allow_dirty = False

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/psf/black
3-
rev: 20.8b1
3+
rev: 22.1.0
44
hooks:
5-
- id: black
6-
language_version: python3
5+
- id: black-jupyter
6+
language_version: python3

docs/kyle/calibration.rst

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/kyle/calibration/calibration_methods.rst

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/kyle/calibration/calibration_methods/calibration_methods.rst

Lines changed: 0 additions & 6 deletions
This file was deleted.

docs/kyle/calibration/model_calibrator.rst

Lines changed: 0 additions & 6 deletions
This file was deleted.

notebooks/calibration_demo.ipynb

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,16 @@
6060
"outputs": [],
6161
"source": [
6262
"X, y = datasets.make_classification(\n",
63-
" n_samples=n_samples,\n",
64-
" n_features=20,\n",
65-
" n_informative=7,\n",
66-
" n_redundant=10,\n",
67-
" n_classes=n_classes,\n",
68-
" random_state=42,\n",
69-
" )\n",
63+
" n_samples=n_samples,\n",
64+
" n_features=20,\n",
65+
" n_informative=7,\n",
66+
" n_redundant=10,\n",
67+
" n_classes=n_classes,\n",
68+
" random_state=42,\n",
69+
")\n",
7070
"X_train, X_test, y_train, y_test = train_test_split(\n",
71-
" X, y, test_size=0.2, random_state=42\n",
72-
" )"
71+
" X, y, test_size=0.2, random_state=42\n",
72+
")"
7373
]
7474
},
7575
{
@@ -270,10 +270,9 @@
270270
"outputs": [],
271271
"source": [
272272
"# Create model calibrator and calibrate model\n",
273-
"calibrator = ModelCalibrator(X_calibrate=X_test, \n",
274-
" y_calibrate=y_test, \n",
275-
" X_fit=X_train, \n",
276-
" y_fit=y_train)"
273+
"calibrator = ModelCalibrator(\n",
274+
" X_calibrate=X_test, y_calibrate=y_test, X_fit=X_train, y_fit=y_train\n",
275+
")"
277276
]
278277
},
279278
{
@@ -305,7 +304,7 @@
305304
"metadata": {},
306305
"outputs": [],
307306
"source": [
308-
"# Passing X_test instead of X_calibrate in predict_proba() to make comparison with pre-calib model clear, \n",
307+
"# Passing X_test instead of X_calibrate in predict_proba() to make comparison with pre-calib model clear,\n",
309308
"# same reasong for y_test in ece.compute()\n",
310309
"calibrated_confidences = calibratable_model.predict_proba(X_test)\n",
311310
"\n",
@@ -428,10 +427,11 @@
428427
"source": [
429428
"def overestimating_max(x: np.ndarray):\n",
430429
" x = x.copy()\n",
431-
" mask = x > 1/2\n",
432-
" x[mask] = x[mask] - (1/4 - (1-x[mask])**2)\n",
430+
" mask = x > 1 / 2\n",
431+
" x[mask] = x[mask] - (1 / 4 - (1 - x[mask]) ** 2)\n",
433432
" return x\n",
434433
"\n",
434+
"\n",
435435
"automorphism = MaxComponentSimplexAut(overestimating_max)\n",
436436
"shifted_sampler = DirichletFC(num_classes=2, simplex_automorphism=automorphism)\n",
437437
"\n",

0 commit comments

Comments
 (0)