{ "cells": [ { "cell_type": "markdown", "id": "b1db8c9a", "metadata": {}, "source": [ "# Sufficient Reasons" ] }, { "cell_type": "markdown", "id": "514a5144", "metadata": {}, "source": [ "Formally, an **abductive explanation** $t$ for an instance $x$ given a classifier $f$ (that is binary or not) \n", "is a subset $t$ of the characteristics of $x$ such that every instance $x'$ sharing this set t of characteristics is classified by $f$ as $x$ is. A **sufficient reason** $t$ for $x$ given $f$ is an abductive explanation for $x$ given $f$ such that no proper subset $t'$ of $t$ is an abductive explanation for $x$ given $f$ (i.e., minimal w.r.t. set inclusion).\n", "\n", "Considering the boosted tree of the [Building Models](/documentation/learning/builder/BTbuilder/) page consisting of $4$ features ($A_1$, $A_2$, $A_3$ and $A_4$), we can derive as an example the sufficient reason $t$ = ($A_1 = 4$, $A_4 = 1$) for the instance $x$ = ($A_1=4$, $A_2 = 3$, $A_3 = 1$, $A_4 = 1$). In this figure, this sufficient reason is shown in red:\n", "\n", "\"BTdirect\"\n", "\n", "As you can see on the figure, some leaves of this sufficient reason corresponds to positive or negative predictions. \n", "However, all the instances $x'$ extending $t$ can be gathered into four categories, obtained by considering the truth values of the Boolean conditions over the two remaining attributes ($A_2$ and $A_3$) as encountered in the trees of $BT$. This table shows that, in every case, we have $W(F, x') > 0$, showing that $f(x') = 1$.\n", "\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", "
$A_1 = 4$$A_2 = 3$$A_3 = 1$$A_4 = 4$$w(T_1,x')$$w(T_2,x')$$w(T_3,x')$$W(F,x)$
10010.40.30.20.9
10110.40.3-0.40.3
1101-0.30.50.30.5
11110.30.50.10.9
" ] }, { "cell_type": "markdown", "id": "a411d454", "metadata": {}, "source": [ "{: .attention }\n", "> The algorithms to compute sufficient reasons are still under development and should be available in the next versions of PyXAI." ] }, { "cell_type": "markdown", "id": "ad4e00c7", "metadata": {}, "source": [ "{: .attention }\n", "> Calculating the sufficient reasons is a computationally difficult task (deciding whether $t$ is an abductive explanation for $x$ given $BT$ is ${\\sf coNP}$-complete. To overcome this problem, we introduce another kind of abductive explanations easier to calculate, the [Tree-Specific](/documentation/classification/BTexplanations/treespecific/) reasons. " ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.12" }, "toc": { "base_numbering": 1, "nav_menu": {}, "number_sections": true, "sideBar": true, "skip_h1_title": false, "title_cell": "Table of Contents", "title_sidebar": "Contents", "toc_cell": false, "toc_position": {}, "toc_section_display": true, "toc_window_display": false } }, "nbformat": 4, "nbformat_minor": 5 }