Skip to content

Commit

Permalink
calibrated-explanations v0.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
tuvelofstrom committed May 25, 2024
1 parent 4459a9f commit b46716b
Show file tree
Hide file tree
Showing 21 changed files with 4,443 additions and 5,243 deletions.
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
# Changelog

## [Unreleased]
[Full changelog](https://github.com/Moffran/calibrated_explanations/compare/v0.3.2...main)
[Full changelog](https://github.com/Moffran/calibrated_explanations/compare/v0.3.3...main)
### Features
- Changed how probabilistic regression is done to handle both validity and speed by dividing the calibration set into two sets to allow pre-computation of the CPS.
### Fixes

## [v0.3.3](https://github.com/Moffran/calibrated_explanations/releases/tag/v0.3.3) - 2024-05-25
[Full changelog](https://github.com/Moffran/calibrated_explanations/compare/v0.3.2...v0.3.3)
### Features
- Changed how probabilistic regression is done to handle both validity and speed by dividing the calibration set into two sets to allow pre-computation of the CPS. Credits to anonymous reviewer for this suggestion.
- Added updated regression experiments and plotting for revised paper.
- Added a new `under the hood` demo notebook to show how to access the information used in the plots, like conditions and uncertainties etc.
### Fixes
- Several minor updates to descrptions and notebooks in the repository.

## [v0.3.2](https://github.com/Moffran/calibrated_explanations/releases/tag/v0.3.2) - 2024-04-14
[Full changelog](https://github.com/Moffran/calibrated_explanations/compare/v0.3.1...v0.3.2)
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Calibrated Explanations ([Documentation](https://calibrated-explanations.readthe
[![Lint Status for Calibrated Explanations][lint-status]][lint-log]
[![License](https://badgen.net/github/license/moffran/calibrated_explanations)](https://github.com/moffran/calibrated_explanations/blob/main/LICENSE)
[![Downloads](https://static.pepy.tech/badge/calibrated-explanations)](https://pepy.tech/project/calibrated-explanations)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/Moffran/calibrated_explanations/v0.3.2)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/Moffran/calibrated_explanations/v0.3.3)

`calibrated-explanations` is a Python package for the local feature importance explanation method called Calibrated Explanations, supporting both [classification](https://doi.org/10.1016/j.eswa.2024.123154) and [regression](https://arxiv.org/abs/2308.16245).
The proposed method is based on Venn-Abers (classification & regression) and Conformal Predictive Systems (regression) and has the following characteristics:
Expand Down Expand Up @@ -319,8 +319,8 @@ To cite this software, use the following bibtex entry:
license = {BSD-3-Clause},
title = {Calibrated Explanations},
url = {https://github.com/Moffran/calibrated_explanations},
version = {v0.3.2},
month = April,
version = {v0.3.3},
month = May,
year = {2024}
}
```
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
version = '0.3'

# The full version, including alpha/beta/rc tags
release = '0.3.2'
release = '0.3.3'


# -- General configuration ---------------------------------------------------
Expand Down
Binary file modified evaluation/regression/paper results formatted.xlsx
Binary file not shown.

Large diffs are not rendered by default.

1,054 changes: 1,054 additions & 0 deletions notebooks/additional_notebooks/demo_multiclass.ipynb

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,33 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 4,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The autoreload extension is already loaded. To reload it, use:\n",
" %reload_ext autoreload\n"
]
}
],
"source": [
"%load_ext autoreload\n",
"%autoreload 2"
]
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"calibrated_explanations v0.3.2\n"
"calibrated_explanations v0.3.3\n"
]
}
],
Expand All @@ -54,14 +63,14 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"dataSet = 'speeddating'\n",
"delimiter = ','\n",
"\n",
"fileName = '../data/' + dataSet + \".csv\"\n",
"fileName = '../../data/' + dataSet + \".csv\"\n",
"df = pd.read_csv(fileName, delimiter=delimiter)\n",
"df = df.dropna()\n",
"df = df.drop(['has_null'], axis=1)\n",
Expand All @@ -70,7 +79,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 7,
"metadata": {},
"outputs": [
{
Expand All @@ -97,7 +106,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 8,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -302,7 +311,7 @@
"[5 rows x 122 columns]"
]
},
"execution_count": 5,
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -313,7 +322,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 9,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -346,7 +355,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 10,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -387,14 +396,14 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Time taken: 0.0038283586502075194\n"
"Time taken: 0.005544281005859375\n"
]
}
],
Expand All @@ -409,14 +418,14 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 12,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Time taken to generate counterfactual rules per instance: 6.99879744052887\n"
"Time taken to generate counterfactual rules per instance: 8.866064476966859\n"
]
}
],
Expand All @@ -428,16 +437,16 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 13,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Time taken plotting counterfactual rules per instance: 0.3077993392944336\n",
"Time taken constructing conjunctive rules per instance: 6.002104902267456\n",
"Time taken plotting counterfactual and conjunctive rules per instance: 0.2936751127243042\n"
"Time taken plotting counterfactual rules per instance: 0.39110465049743653\n",
"Time taken constructing conjunctive rules per instance: 4.672552323341369\n",
"Time taken plotting counterfactual and conjunctive rules per instance: 0.20757381916046141\n"
]
},
{
Expand Down Expand Up @@ -655,7 +664,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 14,
"metadata": {},
"outputs": [
{
Expand Down
Loading

0 comments on commit b46716b

Please sign in to comment.