├── .gitignore
├── LICENSE
├── MANIFEST.in
├── README.md
├── ROADMAP.md
├── docs
├── .nojekyll
├── _images
│ ├── bias.png
│ ├── readme-1.png
│ ├── readme-10.png
│ ├── readme-11.png
│ ├── readme-12.png
│ ├── readme-13.png
│ ├── readme-14.png
│ ├── readme-15.png
│ ├── readme-16.png
│ ├── readme-2.png
│ ├── readme-3.png
│ ├── readme-4.png
│ ├── readme-5.png
│ ├── readme-6.png
│ ├── readme-7.png
│ ├── readme-8.png
│ └── readme-9.png
├── _sources
│ ├── gettingstarted.rst.txt
│ ├── index.rst.txt
│ └── xai.rst.txt
├── _static
│ ├── .nojekyll
│ ├── basic.css
│ ├── bias.png
│ ├── css
│ │ ├── .nojekyll
│ │ ├── badge_only.css
│ │ └── theme.css
│ ├── doctools.js
│ ├── documentation_options.js
│ ├── file.png
│ ├── fonts
│ │ ├── .nojekyll
│ │ ├── Inconsolata-Bold.ttf
│ │ ├── Inconsolata-Regular.ttf
│ │ ├── Inconsolata.ttf
│ │ ├── Lato-Bold.ttf
│ │ ├── Lato-Regular.ttf
│ │ ├── Lato
│ │ │ ├── lato-bold.eot
│ │ │ ├── lato-bold.ttf
│ │ │ ├── lato-bold.woff
│ │ │ ├── lato-bold.woff2
│ │ │ ├── lato-bolditalic.eot
│ │ │ ├── lato-bolditalic.ttf
│ │ │ ├── lato-bolditalic.woff
│ │ │ ├── lato-bolditalic.woff2
│ │ │ ├── lato-italic.eot
│ │ │ ├── lato-italic.ttf
│ │ │ ├── lato-italic.woff
│ │ │ ├── lato-italic.woff2
│ │ │ ├── lato-regular.eot
│ │ │ ├── lato-regular.ttf
│ │ │ ├── lato-regular.woff
│ │ │ └── lato-regular.woff2
│ │ ├── RobotoSlab-Bold.ttf
│ │ ├── RobotoSlab-Regular.ttf
│ │ ├── RobotoSlab
│ │ │ ├── roboto-slab-v7-bold.eot
│ │ │ ├── roboto-slab-v7-bold.ttf
│ │ │ ├── roboto-slab-v7-bold.woff
│ │ │ ├── roboto-slab-v7-bold.woff2
│ │ │ ├── roboto-slab-v7-regular.eot
│ │ │ ├── roboto-slab-v7-regular.ttf
│ │ │ ├── roboto-slab-v7-regular.woff
│ │ │ └── roboto-slab-v7-regular.woff2
│ │ ├── fontawesome-webfont.eot
│ │ ├── fontawesome-webfont.svg
│ │ ├── fontawesome-webfont.ttf
│ │ ├── fontawesome-webfont.woff
│ │ └── fontawesome-webfont.woff2
│ ├── jquery-3.2.1.js
│ ├── jquery.js
│ ├── js
│ │ ├── .nojekyll
│ │ ├── modernizr.min.js
│ │ └── theme.js
│ ├── language_data.js
│ ├── minus.png
│ ├── plus.png
│ ├── pygments.css
│ ├── readme-1.png
│ ├── readme-10.png
│ ├── readme-11.png
│ ├── readme-12.png
│ ├── readme-13.png
│ ├── readme-14.png
│ ├── readme-15.png
│ ├── readme-16.png
│ ├── readme-2.png
│ ├── readme-3.png
│ ├── readme-4.png
│ ├── readme-5.png
│ ├── readme-6.png
│ ├── readme-7.png
│ ├── readme-8.png
│ ├── readme-9.png
│ ├── searchtools.js
│ ├── tech.jpg
│ ├── underscore-1.3.1.js
│ └── underscore.js
├── genindex.html
├── gettingstarted.html
├── index.html
├── objects.inv
├── py-modindex.html
├── search.html
├── searchindex.js
└── xai.html
├── docs_src
├── Makefile
├── make.bat
└── source
│ ├── _static
│ ├── bias.png
│ ├── readme-1.png
│ ├── readme-10.png
│ ├── readme-11.png
│ ├── readme-12.png
│ ├── readme-13.png
│ ├── readme-14.png
│ ├── readme-15.png
│ ├── readme-16.png
│ ├── readme-2.png
│ ├── readme-3.png
│ ├── readme-4.png
│ ├── readme-5.png
│ ├── readme-6.png
│ ├── readme-7.png
│ ├── readme-8.png
│ ├── readme-9.png
│ └── tech.jpg
│ ├── conf.py
│ ├── gettingstarted.rst
│ ├── index.rst
│ └── xai.rst
├── env.yml
├── examples
├── .ipynb_checkpoints
│ └── XData Example Usage-checkpoint.ipynb
├── README.md
├── XAI Tabular Data Example Usage.ipynb
├── XAI Tabular Data Example Usage_files
│ ├── XAI Tabular Data Example Usage_10_1.png
│ ├── XAI Tabular Data Example Usage_15_0.png
│ ├── XAI Tabular Data Example Usage_17_0.png
│ ├── XAI Tabular Data Example Usage_18_0.png
│ ├── XAI Tabular Data Example Usage_18_1.png
│ ├── XAI Tabular Data Example Usage_18_2.png
│ ├── XAI Tabular Data Example Usage_19_0.png
│ ├── XAI Tabular Data Example Usage_20_0.png
│ ├── XAI Tabular Data Example Usage_21_0.png
│ ├── XAI Tabular Data Example Usage_22_0.png
│ ├── XAI Tabular Data Example Usage_22_1.png
│ ├── XAI Tabular Data Example Usage_22_2.png
│ ├── XAI Tabular Data Example Usage_23_0.png
│ ├── XAI Tabular Data Example Usage_24_0.png
│ ├── XAI Tabular Data Example Usage_24_1.png
│ ├── XAI Tabular Data Example Usage_24_2.png
│ ├── XAI Tabular Data Example Usage_25_1.png
│ ├── XAI Tabular Data Example Usage_26_1.png
│ ├── XAI Tabular Data Example Usage_27_1.png
│ ├── XAI Tabular Data Example Usage_28_1.png
│ ├── XAI Tabular Data Example Usage_29_1.png
│ ├── XAI Tabular Data Example Usage_30_1.png
│ ├── XAI Tabular Data Example Usage_31_1.png
│ ├── XAI Tabular Data Example Usage_4_0.png
│ ├── XAI Tabular Data Example Usage_5_0.png
│ ├── XAI Tabular Data Example Usage_6_0.png
│ ├── XAI Tabular Data Example Usage_8_0.png
│ └── XAI Tabular Data Example Usage_9_0.png
└── data
│ └── adult.data
├── images
├── bias.png
├── mlops-link.png
├── readme-10.png
├── readme-11.png
├── readme-12.png
├── readme-13.png
├── readme-14.png
├── readme-15.png
├── readme-16.png
├── readme-3.png
├── readme-4.png
├── readme-5.png
├── readme-6.png
├── readme-7.png
├── readme-8.png
├── readme-9.png
├── readme-balance-split.jpg
├── readme-balance-upsample.jpg
├── readme-confusion-matrix.jpg
├── readme-correlation-dendogram.jpg
├── readme-correlation-matrix.jpg
├── readme-csv-head.jpg
├── readme-groups.jpg
├── readme-imbalance-gender.jpg
├── readme-imbalance-multiple.jpg
├── readme-metrics-column.jpg
├── readme-metrics-multiple.jpg
├── readme-metrics-plot.jpg
├── tech.jpg
└── video.jpg
├── meta.yaml
├── mkdocs.yml
├── requirements.txt
├── setup.py
└── xai
├── __init__.py
└── data
├── __init__.py
└── census.csv
/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled source #
2 | ###################
3 | *.com
4 | *.class
5 | *.dll
6 | *.exe
7 | *.o
8 | *.so
9 |
10 | # Packages #
11 | ############
12 | # it's better to unpack these files and commit the raw source
13 | # git has its own built in compression methods
14 | *.7z
15 | *.dmg
16 | *.gz
17 | *.iso
18 | *.jar
19 | *.rar
20 | *.tar
21 | *.zip
22 |
23 | # Logs and databases #
24 | ######################
25 | *.log
26 | *.sql
27 | *.sqlite
28 |
29 | # OS generated files #
30 | ######################
31 | .DS_Store
32 | .DS_Store?
33 | ._*
34 | .Spotlight-V100
35 | .Trashes
36 | ehthumbs.db
37 | Thumbs.db
38 |
39 | # Python
40 | __pycache__
41 | *.pyc
42 |
43 | # Logs
44 | logs
45 | *.log
46 | npm-debug.log*
47 | yarn-debug.log*
48 | yarn-error.log*
49 |
50 | # Runtime data
51 | pids
52 | *.pid
53 | *.seed
54 | *.pid.lock
55 |
56 | # Directory for instrumented libs generated by jscoverage/JSCover
57 | lib-cov
58 |
59 | # Coverage directory used by tools like istanbul
60 | coverage
61 |
62 | # nyc test coverage
63 | .nyc_output
64 |
65 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
66 | .grunt
67 |
68 | # Bower dependency directory (https://bower.io/)
69 | bower_components
70 |
71 | # node-waf configuration
72 | .lock-wscript
73 |
74 | # Compiled binary addons (http://nodejs.org/api/addons.html)
75 | build/Release
76 |
77 | # Dependency directories
78 | node_modules/
79 |
80 | # Tags
81 | tags
82 | tags.*
83 | .tags
84 | .tags.*
85 |
86 | docs_src/build/
87 | .mypy_cache
88 | xai.egg-info
89 | .eggs
90 | .ipynb_checkpoints
91 |
92 | xai.egg-info/
93 | build/
94 | dist/
95 |
96 | dist/
97 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2018 The Institute for Ethical AI & Machine Learning
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of
4 | this software and associated documentation files (the "Software"), to deal in
5 | the Software without restriction, including without limitation the rights to
6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
7 | the Software, and to permit persons to whom the Software is furnished to do so,
8 | subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | SOFTWARE.
20 |
--------------------------------------------------------------------------------
/MANIFEST.in:
--------------------------------------------------------------------------------
1 | include README.md
2 | include requirements.txt
3 | recursive-include xai *.pickle
4 | recursive-exclude * __pycache__
5 | recursive-include xai *.csv
6 | recursive-exclude * *.py[co]
7 | recursive-include docs *.md *.jpg *.png *.gif
8 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 
2 | 
3 | 
4 | 
5 |
6 | # XAI - An eXplainability toolbox for machine learning
7 |
8 | XAI is a Machine Learning library that is designed with AI explainability in its core. XAI contains various tools that enable for analysis and evaluation of data and models. The XAI library is maintained by [The Institute for Ethical AI & ML](http://ethical.institute/), and it was developed based on the [8 principles for Responsible Machine Learning](http://ethical.institute/principles.html).
9 |
10 | You can find the documentation at [https://ethicalml.github.io/xai/index.html](https://ethicalml.github.io/xai/index.html). You can also check out our [talk at Tensorflow London](https://www.youtube.com/watch?v=GZpfBhQJ0H4) where the idea was first conceived - the talk also contains an insight on the definitions and principles in this library.
11 |
12 | ## YouTube video showing how to use XAI to mitigate undesired biases
13 |
14 |
15 |
16 |
17 | This video of the talk presented at the PyData London 2019 Conference which provides an overview on the motivations for machine learning explainability as well as techniques to introduce explainability and mitigate undesired biases using the XAI Library.
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | Do you want to learn about more awesome machine learning explainability tools? Check out our community-built "Awesome Machine Learning Production & Operations" list which contains an extensive list of tools for explainability, privacy, orchestration and beyond.
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | # 0.1.0
35 |
36 | If you want to see a fully functional demo in action clone this repo and run the Example Jupyter Notebook in the Examples folder .
37 |
38 | ## What do we mean by eXplainable AI?
39 |
40 | We see the challenge of explainability as more than just an algorithmic challenge, which requires a combination of data science best practices with domain-specific knowledge. The XAI library is designed to empower machine learning engineers and relevant domain experts to analyse the end-to-end solution and identify discrepancies that may result in sub-optimal performance relative to the objectives required. More broadly, the XAI library is designed using the 3-steps of explainable machine learning, which involve 1) data analysis, 2) model evaluation, and 3) production monitoring.
41 |
42 | We provide a visual overview of these three steps mentioned above in this diagram:
43 |
44 |
45 |
46 | # XAI Quickstart
47 |
48 | ## Installation
49 |
50 | The XAI package is on PyPI. To install you can run:
51 |
52 | ```
53 | pip install xai
54 | ```
55 |
56 | Alternatively you can install from source by cloning the repo and running:
57 |
58 | ```
59 | python setup.py install
60 | ```
61 |
62 | ## Usage
63 |
64 | You can find example usage in the examples folder.
65 |
66 | ### 1) Data Analysis
67 |
68 | With XAI you can identify imbalances in the data. For this, we will load the census dataset from the XAI library.
69 |
70 | ``` python
71 | import xai.data
72 | df = xai.data.load_census()
73 | df.head()
74 | ```
75 |
76 |
77 | #### View class imbalances for all categories of one column
78 | ``` python
79 | ims = xai.imbalance_plot(df, "gender")
80 | ```
81 |
82 |
83 | #### View imbalances for all categories across multiple columns
84 | ``` python
85 | im = xai.imbalance_plot(df, "gender", "loan")
86 | ```
87 |
88 |
89 | #### Balance classes using upsampling and/or downsampling
90 | ``` python
91 | bal_df = xai.balance(df, "gender", "loan", upsample=0.8)
92 | ```
93 |
94 |
95 | #### Perform custom operations on groups
96 | ``` python
97 | groups = xai.group_by_columns(df, ["gender", "loan"])
98 | for group, group_df in groups:
99 | print(group)
100 | print(group_df["loan"].head(), "\n")
101 | ```
102 |
103 |
104 | #### Visualise correlations as a matrix
105 | ``` python
106 | _ = xai.correlations(df, include_categorical=True, plot_type="matrix")
107 | ```
108 |
109 |
110 | #### Visualise correlations as a hierarchical dendogram
111 | ``` python
112 | _ = xai.correlations(df, include_categorical=True)
113 | ```
114 |
115 |
116 | #### Create a balanced validation and training split dataset
117 | ``` python
118 | # Balanced train-test split with minimum 300 examples of
119 | # the cross of the target y and the column gender
120 | x_train, y_train, x_test, y_test, train_idx, test_idx = \
121 | xai.balanced_train_test_split(
122 | x, y, "gender",
123 | min_per_group=300,
124 | max_per_group=300,
125 | categorical_cols=categorical_cols)
126 |
127 | x_train_display = bal_df[train_idx]
128 | x_test_display = bal_df[test_idx]
129 |
130 | print("Total number of examples: ", x_test.shape[0])
131 |
132 | df_test = x_test_display.copy()
133 | df_test["loan"] = y_test
134 |
135 | _= xai.imbalance_plot(df_test, "gender", "loan", categorical_cols=categorical_cols)
136 | ```
137 |
138 |
139 | ### 2) Model Evaluation
140 |
141 | We are able to also analyse the interaction between inference results and input features. For this, we will train a single layer deep learning model.
142 |
143 | ```
144 | model = build_model(proc_df.drop("loan", axis=1))
145 |
146 | model.fit(f_in(x_train), y_train, epochs=50, batch_size=512)
147 |
148 | probabilities = model.predict(f_in(x_test))
149 | predictions = list((probabilities >= 0.5).astype(int).T[0])
150 | ```
151 |
152 |
153 | #### Visualise permutation feature importance
154 | ``` python
155 | def get_avg(x, y):
156 | return model.evaluate(f_in(x), y, verbose=0)[1]
157 |
158 | imp = xai.feature_importance(x_test, y_test, get_avg)
159 |
160 | imp.head()
161 | ```
162 |
163 |
164 | #### Identify metric imbalances against all test data
165 | ``` python
166 | _= xai.metrics_plot(
167 | y_test,
168 | probabilities)
169 | ```
170 |
171 |
172 | #### Identify metric imbalances across a specific column
173 | ``` python
174 | _ = xai.metrics_plot(
175 | y_test,
176 | probabilities,
177 | df=x_test_display,
178 | cross_cols=["gender"],
179 | categorical_cols=categorical_cols)
180 | ```
181 |
182 |
183 | #### Identify metric imbalances across multiple columns
184 | ``` python
185 | _ = xai.metrics_plot(
186 | y_test,
187 | probabilities,
188 | df=x_test_display,
189 | cross_cols=["gender", "ethnicity"],
190 | categorical_cols=categorical_cols)
191 | ```
192 |
193 |
194 | #### Draw confusion matrix
195 | ``` python
196 | xai.confusion_matrix_plot(y_test, pred)
197 | ```
198 |
199 |
200 | #### Visualise the ROC curve against all test data
201 | ``` python
202 | _ = xai.roc_plot(y_test, probabilities)
203 | ```
204 |
205 |
206 | #### Visualise the ROC curves grouped by a protected column
207 | ``` python
208 | protected = ["gender", "ethnicity", "age"]
209 | _ = [xai.roc_plot(
210 | y_test,
211 | probabilities,
212 | df=x_test_display,
213 | cross_cols=[p],
214 | categorical_cols=categorical_cols) for p in protected]
215 | ```
216 |
217 |
218 | #### Visualise accuracy grouped by probability buckets
219 | ``` python
220 | d = xai.smile_imbalance(
221 | y_test,
222 | probabilities)
223 | ```
224 |
225 |
226 | #### Visualise statistical metrics grouped by probability buckets
227 | ``` python
228 | d = xai.smile_imbalance(
229 | y_test,
230 | probabilities,
231 | display_breakdown=True)
232 | ```
233 |
234 |
235 | #### Visualise benefits of adding manual review on probability thresholds
236 | ``` python
237 | d = xai.smile_imbalance(
238 | y_test,
239 | probabilities,
240 | bins=9,
241 | threshold=0.75,
242 | manual_review=0.375,
243 | display_breakdown=False)
244 | ```
245 |
246 |
247 |
248 |
249 |
250 |
--------------------------------------------------------------------------------
/ROADMAP.md:
--------------------------------------------------------------------------------
1 |
2 | # XAI - eXplainableAI Roadmap
3 |
4 | This page contains the roadmap for the XAI library.
5 |
6 | * Add AIC and BIC model evaluation metrics
7 | * Add numbers on the charts for accuracy metrics
8 | * Enable metrics for multiclass
9 | * Allow all plots to get matplotlib parameters
10 | * Update XAI so it works with the latest version of pandas
11 | * Address runtime warnings on xai.correlations function
12 |
13 |
14 |
--------------------------------------------------------------------------------
/docs/.nojekyll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/.nojekyll
--------------------------------------------------------------------------------
/docs/_images/bias.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_images/bias.png
--------------------------------------------------------------------------------
/docs/_images/readme-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_images/readme-1.png
--------------------------------------------------------------------------------
/docs/_images/readme-10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_images/readme-10.png
--------------------------------------------------------------------------------
/docs/_images/readme-11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_images/readme-11.png
--------------------------------------------------------------------------------
/docs/_images/readme-12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_images/readme-12.png
--------------------------------------------------------------------------------
/docs/_images/readme-13.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_images/readme-13.png
--------------------------------------------------------------------------------
/docs/_images/readme-14.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_images/readme-14.png
--------------------------------------------------------------------------------
/docs/_images/readme-15.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_images/readme-15.png
--------------------------------------------------------------------------------
/docs/_images/readme-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_images/readme-16.png
--------------------------------------------------------------------------------
/docs/_images/readme-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_images/readme-2.png
--------------------------------------------------------------------------------
/docs/_images/readme-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_images/readme-3.png
--------------------------------------------------------------------------------
/docs/_images/readme-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_images/readme-4.png
--------------------------------------------------------------------------------
/docs/_images/readme-5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_images/readme-5.png
--------------------------------------------------------------------------------
/docs/_images/readme-6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_images/readme-6.png
--------------------------------------------------------------------------------
/docs/_images/readme-7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_images/readme-7.png
--------------------------------------------------------------------------------
/docs/_images/readme-8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_images/readme-8.png
--------------------------------------------------------------------------------
/docs/_images/readme-9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_images/readme-9.png
--------------------------------------------------------------------------------
/docs/_sources/gettingstarted.rst.txt:
--------------------------------------------------------------------------------
1 | Getting started guide
2 | =====================
3 |
4 | .. toctree::
5 | :maxdepth: 1
6 | :caption: Contents:
7 |
8 |
9 | Welcome to the ``XAI`` documentation. Here you will find everything
10 |
11 | Indices and tables
12 | ==================
13 |
14 | * :ref:`genindex`
15 | * :doc:`xai`
16 | * :ref:`search`
17 |
18 |
--------------------------------------------------------------------------------
/docs/_sources/index.rst.txt:
--------------------------------------------------------------------------------
1 | .. xai - WordCount Python documentation master file, created by
2 | sphinx-quickstart on Fri Jun 23 15:52:18 2017.
3 | You can adapt this file completely to your liking, but it should at least
4 | contain the root `toctree` directive.
5 |
6 | Welcome to the XAI docs - eXplainable machine learning
7 | ===========================================================
8 |
9 | .. toctree::
10 | :maxdepth: 4
11 |
12 |
13 | Welcome to the ``xai`` documentation. Here you will the installation guide, the quick start guide, and the detailed docstrings code documentation of the xai library.
14 |
15 | The documentation is currently under construction - for the meantime you can check out the main Github repository for the code (https://github.com/EthicalML/xai).
16 |
17 | About
18 | ================
19 |
20 | XAI is a Machine Learning library that is designed with AI explainability in its core. XAI contains various tools that enable for analysis and evaluation of data and models. The XAI library is maintained by `The Institute for Ethical AI & ML `_, and it was developed based on the `8 principles for Responsible Machine Learning `_.
21 |
22 | You can find the documentation at https://ethicalml.github.io/xai/index.html. You can also check out our `talk at Tensorflow London `_ where the idea was first conceived - the talk also contains an insight on the definitions and principles in this library.
23 |
24 | 0.0.4 - ALPHA Version
25 | ------------------------
26 |
27 | This library is currently in early stage developments and hence it will be quite unstable due to the fast updates. It is important to bare this in mind if using it in production.
28 |
29 | What do we mean by eXplainable AI?
30 | ---------------------------------------
31 |
32 | We see the challenge of explainability as more than just an algorithmic challenge, which requires a combination of data science best practices with domain-specific knowledge. The XAI library is designed to empower machine learning engineers and relevant domain experts to analyse the end-to-end solution and identify discrepancies that may result in sub-optimal performance relative to the objectives required. More broadly, the XAI library is designed using the 3-steps of explainable machine learning, which involve 1) data analysis, 2) model evaluation, and 3) production monitoring.
33 |
34 | We provide a visual overview of these three steps mentioned above in this diagram:
35 |
36 | .. image:: _static/bias.png
37 |
38 | XAI Quickstart
39 | ====================================
40 |
41 | Installation
42 | ------------------
43 |
44 | The XAI package is on PyPI. To install you can run:
45 |
46 | .. parsed-literal::
47 |
48 | pip install xai
49 |
50 | Alternatively you can install from source by cloning the repo and running:
51 |
52 | .. parsed-literal::
53 |
54 | python setup.py install
55 |
56 | Usage
57 | ---------
58 |
59 | You can find example usage in the examples folder.
60 |
61 | 1) Data Analysis
62 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
63 |
64 |
65 | With XAI you can identify imbalances in the data. For this, we will load the census dataset from the XAI library.
66 |
67 | .. parsed-literal::
68 |
69 | import xai.data
70 | df = xai.data.load_census()
71 | df.head()
72 |
73 | .. image:: _static/readme-1.png
74 |
75 | View class imbalances for protected columns
76 | """"""""""""""""""""""""""""""""""""""""""""""""""""""
77 |
78 | .. parsed-literal::
79 |
80 | protected_cols = ["gender", "ethnicity", "age"]
81 | ims = xai.show_imbalances(df, protected_cols)
82 |
83 | .. image:: _static/readme-2.png
84 |
85 | View imbalance of one column
86 | """"""""""""""""""""""""""""""""""""""""""""""""""""""
87 |
88 |
89 | .. parsed-literal::
90 |
91 | im = xai.show_imbalance(df, "gender")
92 |
93 | .. image:: _static/readme-3.png
94 |
95 | View imbalance of one column intersected with another
96 | """"""""""""""""""""""""""""""""""""""""""""""""""""""
97 |
98 |
99 | .. parsed-literal::
100 |
101 | im = xai.show_imbalance(df, "gender", cross=["loan"])
102 |
103 | .. image:: _static/readme-4.png
104 |
105 | Balance the class using upsampling and/or downsampling
106 | """"""""""""""""""""""""""""""""""""""""""""""""""""""
107 |
108 |
109 | .. parsed-literal::
110 | bal_df = xai.balance(df, "gender", cross=["loan"], upsample=1.0)
111 |
112 | .. image:: _static/readme-5.png
113 |
114 | Create a balanced test-train split (should be done pre-balancing)
115 | """"""""""""""""""""""""""""""""""""""""""""""""""""""
116 |
117 |
118 | .. parsed-literal::
119 |
120 | # Balanced train-test split with minimum 300 examples of
121 | # the cross of the target y and the column gender
122 | x_train, y_train, x_test, y_test = xai.balanced_train_test_split(
123 | x, y, cross=["gender"],
124 | categorical_cols=categorical_cols, min_per_class=300)
125 |
126 | # Visualise the imbalances of gender and the target
127 | df_test = x_test.copy()
128 | df_test["loan"] = y_test
129 | _= xai.show_imbalance(df_test, "gender", cross=["loan"], categorical_cols=categorical_cols)
130 |
131 | .. image:: _static/readme-16.png
132 |
133 | 2) Model Evaluation
134 | ^^^^^^^^^^^^^^^^^^^^^^^^^
135 |
136 | We are able to also analyse the interaction between inference results and input features. For this, we will train a single layer deep learning model.
137 |
138 | .. parsed-literal::
139 |
140 | model = build_model(proc_df.drop("loan", axis=1))
141 | model.fit(f_in(x_train), y_train, epochs=50, batch_size=512)
142 |
143 | probabilities = model.predict(f_in(x_test))
144 | predictions = list((probabilities >= 0.5).astype(int).T[0])
145 |
146 | .. image:: _static/readme-15.png
147 |
148 | Visualise permutation feature importance
149 | """"""""""""""""""""""""""""""""""""""""""""""""""""""
150 |
151 |
152 | .. parsed-literal::
153 |
154 | def get_avg(x, y):
155 | return model.evaluate(f_in(x), y, verbose=0)[1]
156 |
157 | imp = xai.feature_importance(x_test, y_test, get_avg)
158 |
159 | imp.head()
160 |
161 | .. image:: _static/readme-6.png
162 |
163 | Identify metric imbalances against all test data
164 | """"""""""""""""""""""""""""""""""""""""""""""""""""""
165 |
166 |
167 | .. parsed-literal::
168 |
169 | _= xai.metrics_imbalance(
170 | x_test,
171 | y_test,
172 | probabilities)
173 |
174 | .. image:: _static/readme-7.png
175 |
176 | Identify metric imbalances grouped by protected columns
177 | """"""""""""""""""""""""""""""""""""""""""""""""""""""
178 |
179 |
180 | .. parsed-literal::
181 | _= xai.metrics_imbalances(
182 | x_test,
183 | y_test,
184 | probabilities,
185 | columns=protected,
186 | categorical_cols=categorical_cols)
187 |
188 | .. image:: _static/readme-8.png
189 |
190 | Visualise the ROC curve against all test data
191 | """"""""""""""""""""""""""""""""""""""""""""""""""""""
192 |
193 |
194 | .. parsed-literal::
195 |
196 | _= xai.roc_imbalance(
197 | x_test,
198 | y_test,
199 | probabilities)
200 |
201 | .. image:: _static/readme-9.png
202 |
203 | Visualise the ROC curves grouped by protected columns
204 | """"""""""""""""""""""""""""""""""""""""""""""""""""""
205 |
206 |
207 | .. parsed-literal::
208 | _= xai.roc_imbalances(
209 | x_test,
210 | y_test,
211 | probabilities,
212 | columns=protected,
213 | categorical_cols=categorical_cols)
214 |
215 | .. image:: _static/readme-10.png
216 |
217 | Visualise the precision-recall curve by protected columns
218 | """"""""""""""""""""""""""""""""""""""""""""""""""""""
219 |
220 |
221 | .. parsed-literal::
222 |
223 | _= xai.pr_imbalances(
224 | x_test,
225 | y_test,
226 | probabilities,
227 | columns=protected,
228 | categorical_cols=categorical_cols)
229 |
230 | .. image:: _static/readme-11.png
231 |
232 | Visualise accuracy grouped by probability buckets
233 | """"""""""""""""""""""""""""""""""""""""""""""""""""""
234 |
235 |
236 | .. parsed-literal::
237 |
238 | d = xai.smile_imbalance(
239 | y_test,
240 | probabilities)
241 |
242 | .. image:: _static/readme-12.png
243 |
244 | Visualise statistical metrics grouped by probability buckets
245 | """"""""""""""""""""""""""""""""""""""""""""""""""""""
246 |
247 |
248 | .. parsed-literal::
249 |
250 | d = xai.smile_imbalance(
251 | y_test,
252 | probabilities,
253 | display_breakdown=True)
254 |
255 | .. image:: _static/readme-13.png
256 |
257 | Visualise benefits of adding manual review on probability thresholds
258 | """"""""""""""""""""""""""""""""""""""""""""""""""""""
259 |
260 |
261 | .. parsed-literal::
262 |
263 | d = xai.smile_imbalance(
264 | y_test,
265 | probabilities,
266 | bins=9,
267 | threshold=0.75,
268 | manual_review=0.375,
269 | display_breakdown=False)
270 |
271 | .. image:: _static/readme-14.png
272 |
273 |
274 |
275 | xai Python Docstrings
276 | ===========================
277 |
278 |
279 | Submodules
280 | ------------
281 |
282 | xai\.data module
283 | -----------------
284 |
285 | .. automodule:: xai.data
286 | :members:
287 | :undoc-members:
288 | :show-inheritance:
289 |
290 |
291 | Module contents
292 | -----------------
293 |
294 | .. automodule:: xai
295 | :members:
296 | :undoc-members:
297 | :show-inheritance:
298 |
299 |
--------------------------------------------------------------------------------
/docs/_sources/xai.rst.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_sources/xai.rst.txt
--------------------------------------------------------------------------------
/docs/_static/.nojekyll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/.nojekyll
--------------------------------------------------------------------------------
/docs/_static/basic.css:
--------------------------------------------------------------------------------
1 | /*
2 | * basic.css
3 | * ~~~~~~~~~
4 | *
5 | * Sphinx stylesheet -- basic theme.
6 | *
7 | * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
8 | * :license: BSD, see LICENSE for details.
9 | *
10 | */
11 |
12 | /* -- main layout ----------------------------------------------------------- */
13 |
14 | div.clearer {
15 | clear: both;
16 | }
17 |
18 | /* -- relbar ---------------------------------------------------------------- */
19 |
20 | div.related {
21 | width: 100%;
22 | font-size: 90%;
23 | }
24 |
25 | div.related h3 {
26 | display: none;
27 | }
28 |
29 | div.related ul {
30 | margin: 0;
31 | padding: 0 0 0 10px;
32 | list-style: none;
33 | }
34 |
35 | div.related li {
36 | display: inline;
37 | }
38 |
39 | div.related li.right {
40 | float: right;
41 | margin-right: 5px;
42 | }
43 |
44 | /* -- sidebar --------------------------------------------------------------- */
45 |
46 | div.sphinxsidebarwrapper {
47 | padding: 10px 5px 0 10px;
48 | }
49 |
50 | div.sphinxsidebar {
51 | float: left;
52 | width: 230px;
53 | margin-left: -100%;
54 | font-size: 90%;
55 | word-wrap: break-word;
56 | overflow-wrap : break-word;
57 | }
58 |
59 | div.sphinxsidebar ul {
60 | list-style: none;
61 | }
62 |
63 | div.sphinxsidebar ul ul,
64 | div.sphinxsidebar ul.want-points {
65 | margin-left: 20px;
66 | list-style: square;
67 | }
68 |
69 | div.sphinxsidebar ul ul {
70 | margin-top: 0;
71 | margin-bottom: 0;
72 | }
73 |
74 | div.sphinxsidebar form {
75 | margin-top: 10px;
76 | }
77 |
78 | div.sphinxsidebar input {
79 | border: 1px solid #98dbcc;
80 | font-family: sans-serif;
81 | font-size: 1em;
82 | }
83 |
84 | div.sphinxsidebar #searchbox form.search {
85 | overflow: hidden;
86 | }
87 |
88 | div.sphinxsidebar #searchbox input[type="text"] {
89 | float: left;
90 | width: 80%;
91 | padding: 0.25em;
92 | box-sizing: border-box;
93 | }
94 |
95 | div.sphinxsidebar #searchbox input[type="submit"] {
96 | float: left;
97 | width: 20%;
98 | border-left: none;
99 | padding: 0.25em;
100 | box-sizing: border-box;
101 | }
102 |
103 |
104 | img {
105 | border: 0;
106 | max-width: 100%;
107 | }
108 |
109 | /* -- search page ----------------------------------------------------------- */
110 |
111 | ul.search {
112 | margin: 10px 0 0 20px;
113 | padding: 0;
114 | }
115 |
116 | ul.search li {
117 | padding: 5px 0 5px 20px;
118 | background-image: url(file.png);
119 | background-repeat: no-repeat;
120 | background-position: 0 7px;
121 | }
122 |
123 | ul.search li a {
124 | font-weight: bold;
125 | }
126 |
127 | ul.search li div.context {
128 | color: #888;
129 | margin: 2px 0 0 30px;
130 | text-align: left;
131 | }
132 |
133 | ul.keywordmatches li.goodmatch a {
134 | font-weight: bold;
135 | }
136 |
137 | /* -- index page ------------------------------------------------------------ */
138 |
139 | table.contentstable {
140 | width: 90%;
141 | margin-left: auto;
142 | margin-right: auto;
143 | }
144 |
145 | table.contentstable p.biglink {
146 | line-height: 150%;
147 | }
148 |
149 | a.biglink {
150 | font-size: 1.3em;
151 | }
152 |
153 | span.linkdescr {
154 | font-style: italic;
155 | padding-top: 5px;
156 | font-size: 90%;
157 | }
158 |
159 | /* -- general index --------------------------------------------------------- */
160 |
161 | table.indextable {
162 | width: 100%;
163 | }
164 |
165 | table.indextable td {
166 | text-align: left;
167 | vertical-align: top;
168 | }
169 |
170 | table.indextable ul {
171 | margin-top: 0;
172 | margin-bottom: 0;
173 | list-style-type: none;
174 | }
175 |
176 | table.indextable > tbody > tr > td > ul {
177 | padding-left: 0em;
178 | }
179 |
180 | table.indextable tr.pcap {
181 | height: 10px;
182 | }
183 |
184 | table.indextable tr.cap {
185 | margin-top: 10px;
186 | background-color: #f2f2f2;
187 | }
188 |
189 | img.toggler {
190 | margin-right: 3px;
191 | margin-top: 3px;
192 | cursor: pointer;
193 | }
194 |
195 | div.modindex-jumpbox {
196 | border-top: 1px solid #ddd;
197 | border-bottom: 1px solid #ddd;
198 | margin: 1em 0 1em 0;
199 | padding: 0.4em;
200 | }
201 |
202 | div.genindex-jumpbox {
203 | border-top: 1px solid #ddd;
204 | border-bottom: 1px solid #ddd;
205 | margin: 1em 0 1em 0;
206 | padding: 0.4em;
207 | }
208 |
209 | /* -- domain module index --------------------------------------------------- */
210 |
211 | table.modindextable td {
212 | padding: 2px;
213 | border-collapse: collapse;
214 | }
215 |
216 | /* -- general body styles --------------------------------------------------- */
217 |
218 | div.body {
219 | min-width: 450px;
220 | max-width: 800px;
221 | }
222 |
223 | div.body p, div.body dd, div.body li, div.body blockquote {
224 | -moz-hyphens: auto;
225 | -ms-hyphens: auto;
226 | -webkit-hyphens: auto;
227 | hyphens: auto;
228 | }
229 |
230 | a.headerlink {
231 | visibility: hidden;
232 | }
233 |
234 | a.brackets:before,
235 | span.brackets > a:before{
236 | content: "[";
237 | }
238 |
239 | a.brackets:after,
240 | span.brackets > a:after {
241 | content: "]";
242 | }
243 |
244 | h1:hover > a.headerlink,
245 | h2:hover > a.headerlink,
246 | h3:hover > a.headerlink,
247 | h4:hover > a.headerlink,
248 | h5:hover > a.headerlink,
249 | h6:hover > a.headerlink,
250 | dt:hover > a.headerlink,
251 | caption:hover > a.headerlink,
252 | p.caption:hover > a.headerlink,
253 | div.code-block-caption:hover > a.headerlink {
254 | visibility: visible;
255 | }
256 |
257 | div.body p.caption {
258 | text-align: inherit;
259 | }
260 |
261 | div.body td {
262 | text-align: left;
263 | }
264 |
265 | .first {
266 | margin-top: 0 !important;
267 | }
268 |
269 | p.rubric {
270 | margin-top: 30px;
271 | font-weight: bold;
272 | }
273 |
274 | img.align-left, .figure.align-left, object.align-left {
275 | clear: left;
276 | float: left;
277 | margin-right: 1em;
278 | }
279 |
280 | img.align-right, .figure.align-right, object.align-right {
281 | clear: right;
282 | float: right;
283 | margin-left: 1em;
284 | }
285 |
286 | img.align-center, .figure.align-center, object.align-center {
287 | display: block;
288 | margin-left: auto;
289 | margin-right: auto;
290 | }
291 |
292 | .align-left {
293 | text-align: left;
294 | }
295 |
296 | .align-center {
297 | text-align: center;
298 | }
299 |
300 | .align-right {
301 | text-align: right;
302 | }
303 |
304 | /* -- sidebars -------------------------------------------------------------- */
305 |
306 | div.sidebar {
307 | margin: 0 0 0.5em 1em;
308 | border: 1px solid #ddb;
309 | padding: 7px 7px 0 7px;
310 | background-color: #ffe;
311 | width: 40%;
312 | float: right;
313 | }
314 |
315 | p.sidebar-title {
316 | font-weight: bold;
317 | }
318 |
319 | /* -- topics ---------------------------------------------------------------- */
320 |
321 | div.topic {
322 | border: 1px solid #ccc;
323 | padding: 7px 7px 0 7px;
324 | margin: 10px 0 10px 0;
325 | }
326 |
327 | p.topic-title {
328 | font-size: 1.1em;
329 | font-weight: bold;
330 | margin-top: 10px;
331 | }
332 |
333 | /* -- admonitions ----------------------------------------------------------- */
334 |
335 | div.admonition {
336 | margin-top: 10px;
337 | margin-bottom: 10px;
338 | padding: 7px;
339 | }
340 |
341 | div.admonition dt {
342 | font-weight: bold;
343 | }
344 |
345 | div.admonition dl {
346 | margin-bottom: 0;
347 | }
348 |
349 | p.admonition-title {
350 | margin: 0px 10px 5px 0px;
351 | font-weight: bold;
352 | }
353 |
354 | div.body p.centered {
355 | text-align: center;
356 | margin-top: 25px;
357 | }
358 |
359 | /* -- tables ---------------------------------------------------------------- */
360 |
361 | table.docutils {
362 | border: 0;
363 | border-collapse: collapse;
364 | }
365 |
366 | table.align-center {
367 | margin-left: auto;
368 | margin-right: auto;
369 | }
370 |
371 | table caption span.caption-number {
372 | font-style: italic;
373 | }
374 |
375 | table caption span.caption-text {
376 | }
377 |
378 | table.docutils td, table.docutils th {
379 | padding: 1px 8px 1px 5px;
380 | border-top: 0;
381 | border-left: 0;
382 | border-right: 0;
383 | border-bottom: 1px solid #aaa;
384 | }
385 |
386 | table.footnote td, table.footnote th {
387 | border: 0 !important;
388 | }
389 |
390 | th {
391 | text-align: left;
392 | padding-right: 5px;
393 | }
394 |
395 | table.citation {
396 | border-left: solid 1px gray;
397 | margin-left: 1px;
398 | }
399 |
400 | table.citation td {
401 | border-bottom: none;
402 | }
403 |
404 | th > p:first-child,
405 | td > p:first-child {
406 | margin-top: 0px;
407 | }
408 |
409 | th > p:last-child,
410 | td > p:last-child {
411 | margin-bottom: 0px;
412 | }
413 |
414 | /* -- figures --------------------------------------------------------------- */
415 |
416 | div.figure {
417 | margin: 0.5em;
418 | padding: 0.5em;
419 | }
420 |
421 | div.figure p.caption {
422 | padding: 0.3em;
423 | }
424 |
425 | div.figure p.caption span.caption-number {
426 | font-style: italic;
427 | }
428 |
429 | div.figure p.caption span.caption-text {
430 | }
431 |
432 | /* -- field list styles ----------------------------------------------------- */
433 |
434 | table.field-list td, table.field-list th {
435 | border: 0 !important;
436 | }
437 |
438 | .field-list ul {
439 | margin: 0;
440 | padding-left: 1em;
441 | }
442 |
443 | .field-list p {
444 | margin: 0;
445 | }
446 |
447 | .field-name {
448 | -moz-hyphens: manual;
449 | -ms-hyphens: manual;
450 | -webkit-hyphens: manual;
451 | hyphens: manual;
452 | }
453 |
454 | /* -- hlist styles ---------------------------------------------------------- */
455 |
456 | table.hlist td {
457 | vertical-align: top;
458 | }
459 |
460 |
461 | /* -- other body styles ----------------------------------------------------- */
462 |
463 | ol.arabic {
464 | list-style: decimal;
465 | }
466 |
467 | ol.loweralpha {
468 | list-style: lower-alpha;
469 | }
470 |
471 | ol.upperalpha {
472 | list-style: upper-alpha;
473 | }
474 |
475 | ol.lowerroman {
476 | list-style: lower-roman;
477 | }
478 |
479 | ol.upperroman {
480 | list-style: upper-roman;
481 | }
482 |
483 | li > p:first-child {
484 | margin-top: 0px;
485 | }
486 |
487 | li > p:last-child {
488 | margin-bottom: 0px;
489 | }
490 |
491 | dl.footnote > dt,
492 | dl.citation > dt {
493 | float: left;
494 | }
495 |
496 | dl.footnote > dd,
497 | dl.citation > dd {
498 | margin-bottom: 0em;
499 | }
500 |
501 | dl.footnote > dd:after,
502 | dl.citation > dd:after {
503 | content: "";
504 | clear: both;
505 | }
506 |
507 | dl.field-list {
508 | display: flex;
509 | flex-wrap: wrap;
510 | }
511 |
512 | dl.field-list > dt {
513 | flex-basis: 20%;
514 | font-weight: bold;
515 | word-break: break-word;
516 | }
517 |
518 | dl.field-list > dt:after {
519 | content: ":";
520 | }
521 |
522 | dl.field-list > dd {
523 | flex-basis: 70%;
524 | padding-left: 1em;
525 | margin-left: 0em;
526 | margin-bottom: 0em;
527 | }
528 |
529 | dl {
530 | margin-bottom: 15px;
531 | }
532 |
533 | dd > p:first-child {
534 | margin-top: 0px;
535 | }
536 |
537 | dd ul, dd table {
538 | margin-bottom: 10px;
539 | }
540 |
541 | dd {
542 | margin-top: 3px;
543 | margin-bottom: 10px;
544 | margin-left: 30px;
545 | }
546 |
547 | dt:target, span.highlighted {
548 | background-color: #fbe54e;
549 | }
550 |
551 | rect.highlighted {
552 | fill: #fbe54e;
553 | }
554 |
555 | dl.glossary dt {
556 | font-weight: bold;
557 | font-size: 1.1em;
558 | }
559 |
560 | .optional {
561 | font-size: 1.3em;
562 | }
563 |
564 | .sig-paren {
565 | font-size: larger;
566 | }
567 |
568 | .versionmodified {
569 | font-style: italic;
570 | }
571 |
572 | .system-message {
573 | background-color: #fda;
574 | padding: 5px;
575 | border: 3px solid red;
576 | }
577 |
578 | .footnote:target {
579 | background-color: #ffa;
580 | }
581 |
582 | .line-block {
583 | display: block;
584 | margin-top: 1em;
585 | margin-bottom: 1em;
586 | }
587 |
588 | .line-block .line-block {
589 | margin-top: 0;
590 | margin-bottom: 0;
591 | margin-left: 1.5em;
592 | }
593 |
594 | .guilabel, .menuselection {
595 | font-family: sans-serif;
596 | }
597 |
598 | .accelerator {
599 | text-decoration: underline;
600 | }
601 |
602 | .classifier {
603 | font-style: oblique;
604 | }
605 |
606 | .classifier:before {
607 | font-style: normal;
608 | margin: 0.5em;
609 | content: ":";
610 | }
611 |
612 | abbr, acronym {
613 | border-bottom: dotted 1px;
614 | cursor: help;
615 | }
616 |
617 | /* -- code displays --------------------------------------------------------- */
618 |
619 | pre {
620 | overflow: auto;
621 | overflow-y: hidden; /* fixes display issues on Chrome browsers */
622 | }
623 |
624 | span.pre {
625 | -moz-hyphens: none;
626 | -ms-hyphens: none;
627 | -webkit-hyphens: none;
628 | hyphens: none;
629 | }
630 |
631 | td.linenos pre {
632 | padding: 5px 0px;
633 | border: 0;
634 | background-color: transparent;
635 | color: #aaa;
636 | }
637 |
638 | table.highlighttable {
639 | margin-left: 0.5em;
640 | }
641 |
642 | table.highlighttable td {
643 | padding: 0 0.5em 0 0.5em;
644 | }
645 |
646 | div.code-block-caption {
647 | padding: 2px 5px;
648 | font-size: small;
649 | }
650 |
651 | div.code-block-caption code {
652 | background-color: transparent;
653 | }
654 |
655 | div.code-block-caption + div > div.highlight > pre {
656 | margin-top: 0;
657 | }
658 |
659 | div.code-block-caption span.caption-number {
660 | padding: 0.1em 0.3em;
661 | font-style: italic;
662 | }
663 |
664 | div.code-block-caption span.caption-text {
665 | }
666 |
667 | div.literal-block-wrapper {
668 | padding: 1em 1em 0;
669 | }
670 |
671 | div.literal-block-wrapper div.highlight {
672 | margin: 0;
673 | }
674 |
675 | code.descname {
676 | background-color: transparent;
677 | font-weight: bold;
678 | font-size: 1.2em;
679 | }
680 |
681 | code.descclassname {
682 | background-color: transparent;
683 | }
684 |
685 | code.xref, a code {
686 | background-color: transparent;
687 | font-weight: bold;
688 | }
689 |
690 | h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
691 | background-color: transparent;
692 | }
693 |
694 | .viewcode-link {
695 | float: right;
696 | }
697 |
698 | .viewcode-back {
699 | float: right;
700 | font-family: sans-serif;
701 | }
702 |
703 | div.viewcode-block:target {
704 | margin: -1px -10px;
705 | padding: 0 10px;
706 | }
707 |
708 | /* -- math display ---------------------------------------------------------- */
709 |
710 | img.math {
711 | vertical-align: middle;
712 | }
713 |
714 | div.body div.math p {
715 | text-align: center;
716 | }
717 |
718 | span.eqno {
719 | float: right;
720 | }
721 |
722 | span.eqno a.headerlink {
723 | position: relative;
724 | left: 0px;
725 | z-index: 1;
726 | }
727 |
728 | div.math:hover a.headerlink {
729 | visibility: visible;
730 | }
731 |
732 | /* -- printout stylesheet --------------------------------------------------- */
733 |
734 | @media print {
735 | div.document,
736 | div.documentwrapper,
737 | div.bodywrapper {
738 | margin: 0 !important;
739 | width: 100%;
740 | }
741 |
742 | div.sphinxsidebar,
743 | div.related,
744 | div.footer,
745 | #top-link {
746 | display: none;
747 | }
748 | }
--------------------------------------------------------------------------------
/docs/_static/bias.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/bias.png
--------------------------------------------------------------------------------
/docs/_static/css/.nojekyll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/css/.nojekyll
--------------------------------------------------------------------------------
/docs/_static/css/badge_only.css:
--------------------------------------------------------------------------------
1 | .fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-weight:normal;font-style:normal;src:url("../fonts/fontawesome-webfont.eot");src:url("../fonts/fontawesome-webfont.eot?#iefix") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff") format("woff"),url("../fonts/fontawesome-webfont.ttf") format("truetype"),url("../fonts/fontawesome-webfont.svg#FontAwesome") format("svg")}.fa:before{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;text-decoration:inherit}a .fa{display:inline-block;text-decoration:inherit}li .fa{display:inline-block}li .fa-large:before,li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-0.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before,ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before{content:""}.icon-book:before{content:""}.fa-caret-down:before{content:""}.icon-caret-down:before{content:""}.fa-caret-up:before{content:""}.icon-caret-up:before{content:""}.fa-caret-left:before{content:""}.icon-caret-left:before{content:""}.fa-caret-right:before{content:""}.icon-caret-right:before{content:""}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:"Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;z-index:400}.rst-versions a{color:#2980B9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27AE60;*zoom:1}.rst-versions .rst-current-version:before,.rst-versions .rst-current-version:after{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book{float:left}.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#E74C3C;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#F1C40F;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:gray;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:solid 1px #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .icon-book{float:none}.rst-versions.rst-badge .fa-book{float:none}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book{float:left}.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge .rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width: 768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}
2 |
--------------------------------------------------------------------------------
/docs/_static/doctools.js:
--------------------------------------------------------------------------------
1 | /*
2 | * doctools.js
3 | * ~~~~~~~~~~~
4 | *
5 | * Sphinx JavaScript utilities for all documentation.
6 | *
7 | * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
8 | * :license: BSD, see LICENSE for details.
9 | *
10 | */
11 |
12 | /**
13 | * select a different prefix for underscore
14 | */
15 | $u = _.noConflict();
16 |
17 | /**
18 | * make the code below compatible with browsers without
19 | * an installed firebug like debugger
20 | if (!window.console || !console.firebug) {
21 | var names = ["log", "debug", "info", "warn", "error", "assert", "dir",
22 | "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace",
23 | "profile", "profileEnd"];
24 | window.console = {};
25 | for (var i = 0; i < names.length; ++i)
26 | window.console[names[i]] = function() {};
27 | }
28 | */
29 |
30 | /**
31 | * small helper function to urldecode strings
32 | */
33 | jQuery.urldecode = function(x) {
34 | return decodeURIComponent(x).replace(/\+/g, ' ');
35 | };
36 |
37 | /**
38 | * small helper function to urlencode strings
39 | */
40 | jQuery.urlencode = encodeURIComponent;
41 |
42 | /**
43 | * This function returns the parsed url parameters of the
44 | * current request. Multiple values per key are supported,
45 | * it will always return arrays of strings for the value parts.
46 | */
47 | jQuery.getQueryParameters = function(s) {
48 | if (typeof s === 'undefined')
49 | s = document.location.search;
50 | var parts = s.substr(s.indexOf('?') + 1).split('&');
51 | var result = {};
52 | for (var i = 0; i < parts.length; i++) {
53 | var tmp = parts[i].split('=', 2);
54 | var key = jQuery.urldecode(tmp[0]);
55 | var value = jQuery.urldecode(tmp[1]);
56 | if (key in result)
57 | result[key].push(value);
58 | else
59 | result[key] = [value];
60 | }
61 | return result;
62 | };
63 |
64 | /**
65 | * highlight a given string on a jquery object by wrapping it in
66 | * span elements with the given class name.
67 | */
68 | jQuery.fn.highlightText = function(text, className) {
69 | function highlight(node, addItems) {
70 | if (node.nodeType === 3) {
71 | var val = node.nodeValue;
72 | var pos = val.toLowerCase().indexOf(text);
73 | if (pos >= 0 &&
74 | !jQuery(node.parentNode).hasClass(className) &&
75 | !jQuery(node.parentNode).hasClass("nohighlight")) {
76 | var span;
77 | var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
78 | if (isInSVG) {
79 | span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
80 | } else {
81 | span = document.createElement("span");
82 | span.className = className;
83 | }
84 | span.appendChild(document.createTextNode(val.substr(pos, text.length)));
85 | node.parentNode.insertBefore(span, node.parentNode.insertBefore(
86 | document.createTextNode(val.substr(pos + text.length)),
87 | node.nextSibling));
88 | node.nodeValue = val.substr(0, pos);
89 | if (isInSVG) {
90 | var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
91 | var bbox = node.parentElement.getBBox();
92 | rect.x.baseVal.value = bbox.x;
93 | rect.y.baseVal.value = bbox.y;
94 | rect.width.baseVal.value = bbox.width;
95 | rect.height.baseVal.value = bbox.height;
96 | rect.setAttribute('class', className);
97 | addItems.push({
98 | "parent": node.parentNode,
99 | "target": rect});
100 | }
101 | }
102 | }
103 | else if (!jQuery(node).is("button, select, textarea")) {
104 | jQuery.each(node.childNodes, function() {
105 | highlight(this, addItems);
106 | });
107 | }
108 | }
109 | var addItems = [];
110 | var result = this.each(function() {
111 | highlight(this, addItems);
112 | });
113 | for (var i = 0; i < addItems.length; ++i) {
114 | jQuery(addItems[i].parent).before(addItems[i].target);
115 | }
116 | return result;
117 | };
118 |
119 | /*
120 | * backward compatibility for jQuery.browser
121 | * This will be supported until firefox bug is fixed.
122 | */
123 | if (!jQuery.browser) {
124 | jQuery.uaMatch = function(ua) {
125 | ua = ua.toLowerCase();
126 |
127 | var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
128 | /(webkit)[ \/]([\w.]+)/.exec(ua) ||
129 | /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
130 | /(msie) ([\w.]+)/.exec(ua) ||
131 | ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
132 | [];
133 |
134 | return {
135 | browser: match[ 1 ] || "",
136 | version: match[ 2 ] || "0"
137 | };
138 | };
139 | jQuery.browser = {};
140 | jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
141 | }
142 |
143 | /**
144 | * Small JavaScript module for the documentation.
145 | */
146 | var Documentation = {
147 |
148 | init : function() {
149 | this.fixFirefoxAnchorBug();
150 | this.highlightSearchWords();
151 | this.initIndexTable();
152 | if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) {
153 | this.initOnKeyListeners();
154 | }
155 | },
156 |
157 | /**
158 | * i18n support
159 | */
160 | TRANSLATIONS : {},
161 | PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; },
162 | LOCALE : 'unknown',
163 |
164 | // gettext and ngettext don't access this so that the functions
165 | // can safely bound to a different name (_ = Documentation.gettext)
166 | gettext : function(string) {
167 | var translated = Documentation.TRANSLATIONS[string];
168 | if (typeof translated === 'undefined')
169 | return string;
170 | return (typeof translated === 'string') ? translated : translated[0];
171 | },
172 |
173 | ngettext : function(singular, plural, n) {
174 | var translated = Documentation.TRANSLATIONS[singular];
175 | if (typeof translated === 'undefined')
176 | return (n == 1) ? singular : plural;
177 | return translated[Documentation.PLURALEXPR(n)];
178 | },
179 |
180 | addTranslations : function(catalog) {
181 | for (var key in catalog.messages)
182 | this.TRANSLATIONS[key] = catalog.messages[key];
183 | this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');
184 | this.LOCALE = catalog.locale;
185 | },
186 |
187 | /**
188 | * add context elements like header anchor links
189 | */
190 | addContextElements : function() {
191 | $('div[id] > :header:first').each(function() {
192 | $('').
193 | attr('href', '#' + this.id).
194 | attr('title', _('Permalink to this headline')).
195 | appendTo(this);
196 | });
197 | $('dt[id]').each(function() {
198 | $('').
199 | attr('href', '#' + this.id).
200 | attr('title', _('Permalink to this definition')).
201 | appendTo(this);
202 | });
203 | },
204 |
205 | /**
206 | * workaround a firefox stupidity
207 | * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075
208 | */
209 | fixFirefoxAnchorBug : function() {
210 | if (document.location.hash && $.browser.mozilla)
211 | window.setTimeout(function() {
212 | document.location.href += '';
213 | }, 10);
214 | },
215 |
216 | /**
217 | * highlight the search words provided in the url in the text
218 | */
219 | highlightSearchWords : function() {
220 | var params = $.getQueryParameters();
221 | var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
222 | if (terms.length) {
223 | var body = $('div.body');
224 | if (!body.length) {
225 | body = $('body');
226 | }
227 | window.setTimeout(function() {
228 | $.each(terms, function() {
229 | body.highlightText(this.toLowerCase(), 'highlighted');
230 | });
231 | }, 10);
232 | $('' + _('Hide Search Matches') + '
')
234 | .appendTo($('#searchbox'));
235 | }
236 | },
237 |
238 | /**
239 | * init the domain index toggle buttons
240 | */
241 | initIndexTable : function() {
242 | var togglers = $('img.toggler').click(function() {
243 | var src = $(this).attr('src');
244 | var idnum = $(this).attr('id').substr(7);
245 | $('tr.cg-' + idnum).toggle();
246 | if (src.substr(-9) === 'minus.png')
247 | $(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
248 | else
249 | $(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
250 | }).css('display', '');
251 | if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) {
252 | togglers.click();
253 | }
254 | },
255 |
256 | /**
257 | * helper function to hide the search marks again
258 | */
259 | hideSearchWords : function() {
260 | $('#searchbox .highlight-link').fadeOut(300);
261 | $('span.highlighted').removeClass('highlighted');
262 | },
263 |
264 | /**
265 | * make the url absolute
266 | */
267 | makeURL : function(relativeURL) {
268 | return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;
269 | },
270 |
271 | /**
272 | * get the current relative url
273 | */
274 | getCurrentURL : function() {
275 | var path = document.location.pathname;
276 | var parts = path.split(/\//);
277 | $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
278 | if (this === '..')
279 | parts.pop();
280 | });
281 | var url = parts.join('/');
282 | return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
283 | },
284 |
285 | initOnKeyListeners: function() {
286 | $(document).keyup(function(event) {
287 | var activeElementType = document.activeElement.tagName;
288 | // don't navigate when in search box or textarea
289 | if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT') {
290 | switch (event.keyCode) {
291 | case 37: // left
292 | var prevHref = $('link[rel="prev"]').prop('href');
293 | if (prevHref) {
294 | window.location.href = prevHref;
295 | return false;
296 | }
297 | case 39: // right
298 | var nextHref = $('link[rel="next"]').prop('href');
299 | if (nextHref) {
300 | window.location.href = nextHref;
301 | return false;
302 | }
303 | }
304 | }
305 | });
306 | }
307 | };
308 |
309 | // quick alias for translations
310 | _ = Documentation.gettext;
311 |
312 | $(document).ready(function() {
313 | Documentation.init();
314 | });
315 |
--------------------------------------------------------------------------------
/docs/_static/documentation_options.js:
--------------------------------------------------------------------------------
1 | var DOCUMENTATION_OPTIONS = {
2 | URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
3 | VERSION: '0.1',
4 | LANGUAGE: 'None',
5 | COLLAPSE_INDEX: false,
6 | FILE_SUFFIX: '.html',
7 | HAS_SOURCE: true,
8 | SOURCELINK_SUFFIX: '.txt',
9 | NAVIGATION_WITH_KEYS: false
10 | };
--------------------------------------------------------------------------------
/docs/_static/file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/file.png
--------------------------------------------------------------------------------
/docs/_static/fonts/.nojekyll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/.nojekyll
--------------------------------------------------------------------------------
/docs/_static/fonts/Inconsolata-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/Inconsolata-Bold.ttf
--------------------------------------------------------------------------------
/docs/_static/fonts/Inconsolata-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/Inconsolata-Regular.ttf
--------------------------------------------------------------------------------
/docs/_static/fonts/Inconsolata.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/Inconsolata.ttf
--------------------------------------------------------------------------------
/docs/_static/fonts/Lato-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/Lato-Bold.ttf
--------------------------------------------------------------------------------
/docs/_static/fonts/Lato-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/Lato-Regular.ttf
--------------------------------------------------------------------------------
/docs/_static/fonts/Lato/lato-bold.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/Lato/lato-bold.eot
--------------------------------------------------------------------------------
/docs/_static/fonts/Lato/lato-bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/Lato/lato-bold.ttf
--------------------------------------------------------------------------------
/docs/_static/fonts/Lato/lato-bold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/Lato/lato-bold.woff
--------------------------------------------------------------------------------
/docs/_static/fonts/Lato/lato-bold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/Lato/lato-bold.woff2
--------------------------------------------------------------------------------
/docs/_static/fonts/Lato/lato-bolditalic.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/Lato/lato-bolditalic.eot
--------------------------------------------------------------------------------
/docs/_static/fonts/Lato/lato-bolditalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/Lato/lato-bolditalic.ttf
--------------------------------------------------------------------------------
/docs/_static/fonts/Lato/lato-bolditalic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/Lato/lato-bolditalic.woff
--------------------------------------------------------------------------------
/docs/_static/fonts/Lato/lato-bolditalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/Lato/lato-bolditalic.woff2
--------------------------------------------------------------------------------
/docs/_static/fonts/Lato/lato-italic.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/Lato/lato-italic.eot
--------------------------------------------------------------------------------
/docs/_static/fonts/Lato/lato-italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/Lato/lato-italic.ttf
--------------------------------------------------------------------------------
/docs/_static/fonts/Lato/lato-italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/Lato/lato-italic.woff
--------------------------------------------------------------------------------
/docs/_static/fonts/Lato/lato-italic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/Lato/lato-italic.woff2
--------------------------------------------------------------------------------
/docs/_static/fonts/Lato/lato-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/Lato/lato-regular.eot
--------------------------------------------------------------------------------
/docs/_static/fonts/Lato/lato-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/Lato/lato-regular.ttf
--------------------------------------------------------------------------------
/docs/_static/fonts/Lato/lato-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/Lato/lato-regular.woff
--------------------------------------------------------------------------------
/docs/_static/fonts/Lato/lato-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/Lato/lato-regular.woff2
--------------------------------------------------------------------------------
/docs/_static/fonts/RobotoSlab-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/RobotoSlab-Bold.ttf
--------------------------------------------------------------------------------
/docs/_static/fonts/RobotoSlab-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/RobotoSlab-Regular.ttf
--------------------------------------------------------------------------------
/docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot
--------------------------------------------------------------------------------
/docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf
--------------------------------------------------------------------------------
/docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff
--------------------------------------------------------------------------------
/docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2
--------------------------------------------------------------------------------
/docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot
--------------------------------------------------------------------------------
/docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf
--------------------------------------------------------------------------------
/docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff
--------------------------------------------------------------------------------
/docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2
--------------------------------------------------------------------------------
/docs/_static/fonts/fontawesome-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/fontawesome-webfont.eot
--------------------------------------------------------------------------------
/docs/_static/fonts/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/docs/_static/fonts/fontawesome-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/fontawesome-webfont.woff
--------------------------------------------------------------------------------
/docs/_static/fonts/fontawesome-webfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/fonts/fontawesome-webfont.woff2
--------------------------------------------------------------------------------
/docs/_static/js/.nojekyll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/js/.nojekyll
--------------------------------------------------------------------------------
/docs/_static/js/modernizr.min.js:
--------------------------------------------------------------------------------
1 | /* Modernizr 2.6.2 (Custom Build) | MIT & BSD
2 | * Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-mq-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load
3 | */
4 | ;window.Modernizr=function(a,b,c){function D(a){j.cssText=a}function E(a,b){return D(n.join(a+";")+(b||""))}function F(a,b){return typeof a===b}function G(a,b){return!!~(""+a).indexOf(b)}function H(a,b){for(var d in a){var e=a[d];if(!G(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function I(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:F(f,"function")?f.bind(d||b):f}return!1}function J(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return F(b,"string")||F(b,"undefined")?H(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),I(e,b,c))}function K(){e.input=function(c){for(var d=0,e=c.length;d',a,""].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},z=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return y("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},A=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=F(e[d],"function"),F(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),B={}.hasOwnProperty,C;!F(B,"undefined")&&!F(B.call,"undefined")?C=function(a,b){return B.call(a,b)}:C=function(a,b){return b in a&&F(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e}),s.flexbox=function(){return J("flexWrap")},s.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},s.canvastext=function(){return!!e.canvas&&!!F(b.createElement("canvas").getContext("2d").fillText,"function")},s.webgl=function(){return!!a.WebGLRenderingContext},s.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:y(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},s.geolocation=function(){return"geolocation"in navigator},s.postmessage=function(){return!!a.postMessage},s.websqldatabase=function(){return!!a.openDatabase},s.indexedDB=function(){return!!J("indexedDB",a)},s.hashchange=function(){return A("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},s.history=function(){return!!a.history&&!!history.pushState},s.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},s.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},s.rgba=function(){return D("background-color:rgba(150,255,150,.5)"),G(j.backgroundColor,"rgba")},s.hsla=function(){return D("background-color:hsla(120,40%,100%,.5)"),G(j.backgroundColor,"rgba")||G(j.backgroundColor,"hsla")},s.multiplebgs=function(){return D("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=function(){return J("backgroundSize")},s.borderimage=function(){return J("borderImage")},s.borderradius=function(){return J("borderRadius")},s.boxshadow=function(){return J("boxShadow")},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return E("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return J("animationName")},s.csscolumns=function(){return J("columnCount")},s.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return D((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),G(j.backgroundImage,"gradient")},s.cssreflections=function(){return J("boxReflect")},s.csstransforms=function(){return!!J("transform")},s.csstransforms3d=function(){var a=!!J("perspective");return a&&"webkitPerspective"in g.style&&y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},s.csstransitions=function(){return J("transition")},s.fontface=function(){var a;return y('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},s.generatedcontent=function(){var a;return y(["#",h,"{font:0/0 a}#",h,':after{content:"',l,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},s.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},s.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},s.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},s.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}},s.webworkers=function(){return!!a.Worker},s.applicationcache=function(){return!!a.applicationCache},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML=" ",(a.firstChild&&a.firstChild.namespaceURI)==r.svg},s.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(m.call(b.createElementNS(r.svg,"animate")))},s.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,"clipPath")))};for(var L in s)C(s,L)&&(x=L.toLowerCase(),e[x]=s[L](),v.push((e[x]?"":"no-")+x));return e.input||K(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)C(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},D(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.mq=z,e.hasEvent=A,e.testProp=function(a){return H([a])},e.testAllProps=J,e.testStyles=y,e.prefixed=function(a,b,c){return b?J(a,b,c):J(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+v.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f"),i("table.docutils.footnote").wrap(""),i("table.docutils.citation").wrap("
"),i(".wy-menu-vertical ul").not(".simple").siblings("a").each(function(){var e=i(this);expand=i(' '),expand.on("click",function(n){return t.toggleCurrent(e),n.stopPropagation(),!1}),e.prepend(expand)})},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),i=e.find('[href="'+n+'"]');if(0===i.length){var t=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(i=e.find('[href="#'+t.attr("id")+'"]')).length&&(i=e.find('[href="#"]'))}0this.docHeight||(this.navBar.scrollTop(i),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",function(){this.linkScroll=!1})},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current"),e.siblings().find("li.current").removeClass("current"),e.find("> ul li.current").removeClass("current"),e.toggleClass("current")}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:e.exports.ThemeNav,StickyNav:e.exports.ThemeNav}),function(){for(var r=0,n=["ms","moz","webkit","o"],e=0;e0
62 | var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1
63 | var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1
64 | var s_v = "^(" + C + ")?" + v; // vowel in stem
65 |
66 | this.stemWord = function (w) {
67 | var stem;
68 | var suffix;
69 | var firstch;
70 | var origword = w;
71 |
72 | if (w.length < 3)
73 | return w;
74 |
75 | var re;
76 | var re2;
77 | var re3;
78 | var re4;
79 |
80 | firstch = w.substr(0,1);
81 | if (firstch == "y")
82 | w = firstch.toUpperCase() + w.substr(1);
83 |
84 | // Step 1a
85 | re = /^(.+?)(ss|i)es$/;
86 | re2 = /^(.+?)([^s])s$/;
87 |
88 | if (re.test(w))
89 | w = w.replace(re,"$1$2");
90 | else if (re2.test(w))
91 | w = w.replace(re2,"$1$2");
92 |
93 | // Step 1b
94 | re = /^(.+?)eed$/;
95 | re2 = /^(.+?)(ed|ing)$/;
96 | if (re.test(w)) {
97 | var fp = re.exec(w);
98 | re = new RegExp(mgr0);
99 | if (re.test(fp[1])) {
100 | re = /.$/;
101 | w = w.replace(re,"");
102 | }
103 | }
104 | else if (re2.test(w)) {
105 | var fp = re2.exec(w);
106 | stem = fp[1];
107 | re2 = new RegExp(s_v);
108 | if (re2.test(stem)) {
109 | w = stem;
110 | re2 = /(at|bl|iz)$/;
111 | re3 = new RegExp("([^aeiouylsz])\\1$");
112 | re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
113 | if (re2.test(w))
114 | w = w + "e";
115 | else if (re3.test(w)) {
116 | re = /.$/;
117 | w = w.replace(re,"");
118 | }
119 | else if (re4.test(w))
120 | w = w + "e";
121 | }
122 | }
123 |
124 | // Step 1c
125 | re = /^(.+?)y$/;
126 | if (re.test(w)) {
127 | var fp = re.exec(w);
128 | stem = fp[1];
129 | re = new RegExp(s_v);
130 | if (re.test(stem))
131 | w = stem + "i";
132 | }
133 |
134 | // Step 2
135 | re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
136 | if (re.test(w)) {
137 | var fp = re.exec(w);
138 | stem = fp[1];
139 | suffix = fp[2];
140 | re = new RegExp(mgr0);
141 | if (re.test(stem))
142 | w = stem + step2list[suffix];
143 | }
144 |
145 | // Step 3
146 | re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
147 | if (re.test(w)) {
148 | var fp = re.exec(w);
149 | stem = fp[1];
150 | suffix = fp[2];
151 | re = new RegExp(mgr0);
152 | if (re.test(stem))
153 | w = stem + step3list[suffix];
154 | }
155 |
156 | // Step 4
157 | re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
158 | re2 = /^(.+?)(s|t)(ion)$/;
159 | if (re.test(w)) {
160 | var fp = re.exec(w);
161 | stem = fp[1];
162 | re = new RegExp(mgr1);
163 | if (re.test(stem))
164 | w = stem;
165 | }
166 | else if (re2.test(w)) {
167 | var fp = re2.exec(w);
168 | stem = fp[1] + fp[2];
169 | re2 = new RegExp(mgr1);
170 | if (re2.test(stem))
171 | w = stem;
172 | }
173 |
174 | // Step 5
175 | re = /^(.+?)e$/;
176 | if (re.test(w)) {
177 | var fp = re.exec(w);
178 | stem = fp[1];
179 | re = new RegExp(mgr1);
180 | re2 = new RegExp(meq1);
181 | re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
182 | if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
183 | w = stem;
184 | }
185 | re = /ll$/;
186 | re2 = new RegExp(mgr1);
187 | if (re.test(w) && re2.test(w)) {
188 | re = /.$/;
189 | w = w.replace(re,"");
190 | }
191 |
192 | // and turn initial Y back to y
193 | if (firstch == "y")
194 | w = firstch.toLowerCase() + w.substr(1);
195 | return w;
196 | }
197 | }
198 |
199 |
200 |
201 |
202 |
203 | var splitChars = (function() {
204 | var result = {};
205 | var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 1014, 1648,
206 | 1748, 1809, 2416, 2473, 2481, 2526, 2601, 2609, 2612, 2615, 2653, 2702,
207 | 2706, 2729, 2737, 2740, 2857, 2865, 2868, 2910, 2928, 2948, 2961, 2971,
208 | 2973, 3085, 3089, 3113, 3124, 3213, 3217, 3241, 3252, 3295, 3341, 3345,
209 | 3369, 3506, 3516, 3633, 3715, 3721, 3736, 3744, 3748, 3750, 3756, 3761,
210 | 3781, 3912, 4239, 4347, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 4823,
211 | 4881, 5760, 5901, 5997, 6313, 7405, 8024, 8026, 8028, 8030, 8117, 8125,
212 | 8133, 8181, 8468, 8485, 8487, 8489, 8494, 8527, 11311, 11359, 11687, 11695,
213 | 11703, 11711, 11719, 11727, 11735, 12448, 12539, 43010, 43014, 43019, 43587,
214 | 43696, 43713, 64286, 64297, 64311, 64317, 64319, 64322, 64325, 65141];
215 | var i, j, start, end;
216 | for (i = 0; i < singles.length; i++) {
217 | result[singles[i]] = true;
218 | }
219 | var ranges = [[0, 47], [58, 64], [91, 94], [123, 169], [171, 177], [182, 184], [706, 709],
220 | [722, 735], [741, 747], [751, 879], [888, 889], [894, 901], [1154, 1161],
221 | [1318, 1328], [1367, 1368], [1370, 1376], [1416, 1487], [1515, 1519], [1523, 1568],
222 | [1611, 1631], [1642, 1645], [1750, 1764], [1767, 1773], [1789, 1790], [1792, 1807],
223 | [1840, 1868], [1958, 1968], [1970, 1983], [2027, 2035], [2038, 2041], [2043, 2047],
224 | [2070, 2073], [2075, 2083], [2085, 2087], [2089, 2307], [2362, 2364], [2366, 2383],
225 | [2385, 2391], [2402, 2405], [2419, 2424], [2432, 2436], [2445, 2446], [2449, 2450],
226 | [2483, 2485], [2490, 2492], [2494, 2509], [2511, 2523], [2530, 2533], [2546, 2547],
227 | [2554, 2564], [2571, 2574], [2577, 2578], [2618, 2648], [2655, 2661], [2672, 2673],
228 | [2677, 2692], [2746, 2748], [2750, 2767], [2769, 2783], [2786, 2789], [2800, 2820],
229 | [2829, 2830], [2833, 2834], [2874, 2876], [2878, 2907], [2914, 2917], [2930, 2946],
230 | [2955, 2957], [2966, 2968], [2976, 2978], [2981, 2983], [2987, 2989], [3002, 3023],
231 | [3025, 3045], [3059, 3076], [3130, 3132], [3134, 3159], [3162, 3167], [3170, 3173],
232 | [3184, 3191], [3199, 3204], [3258, 3260], [3262, 3293], [3298, 3301], [3312, 3332],
233 | [3386, 3388], [3390, 3423], [3426, 3429], [3446, 3449], [3456, 3460], [3479, 3481],
234 | [3518, 3519], [3527, 3584], [3636, 3647], [3655, 3663], [3674, 3712], [3717, 3718],
235 | [3723, 3724], [3726, 3731], [3752, 3753], [3764, 3772], [3774, 3775], [3783, 3791],
236 | [3802, 3803], [3806, 3839], [3841, 3871], [3892, 3903], [3949, 3975], [3980, 4095],
237 | [4139, 4158], [4170, 4175], [4182, 4185], [4190, 4192], [4194, 4196], [4199, 4205],
238 | [4209, 4212], [4226, 4237], [4250, 4255], [4294, 4303], [4349, 4351], [4686, 4687],
239 | [4702, 4703], [4750, 4751], [4790, 4791], [4806, 4807], [4886, 4887], [4955, 4968],
240 | [4989, 4991], [5008, 5023], [5109, 5120], [5741, 5742], [5787, 5791], [5867, 5869],
241 | [5873, 5887], [5906, 5919], [5938, 5951], [5970, 5983], [6001, 6015], [6068, 6102],
242 | [6104, 6107], [6109, 6111], [6122, 6127], [6138, 6159], [6170, 6175], [6264, 6271],
243 | [6315, 6319], [6390, 6399], [6429, 6469], [6510, 6511], [6517, 6527], [6572, 6592],
244 | [6600, 6607], [6619, 6655], [6679, 6687], [6741, 6783], [6794, 6799], [6810, 6822],
245 | [6824, 6916], [6964, 6980], [6988, 6991], [7002, 7042], [7073, 7085], [7098, 7167],
246 | [7204, 7231], [7242, 7244], [7294, 7400], [7410, 7423], [7616, 7679], [7958, 7959],
247 | [7966, 7967], [8006, 8007], [8014, 8015], [8062, 8063], [8127, 8129], [8141, 8143],
248 | [8148, 8149], [8156, 8159], [8173, 8177], [8189, 8303], [8306, 8307], [8314, 8318],
249 | [8330, 8335], [8341, 8449], [8451, 8454], [8456, 8457], [8470, 8472], [8478, 8483],
250 | [8506, 8507], [8512, 8516], [8522, 8525], [8586, 9311], [9372, 9449], [9472, 10101],
251 | [10132, 11263], [11493, 11498], [11503, 11516], [11518, 11519], [11558, 11567],
252 | [11622, 11630], [11632, 11647], [11671, 11679], [11743, 11822], [11824, 12292],
253 | [12296, 12320], [12330, 12336], [12342, 12343], [12349, 12352], [12439, 12444],
254 | [12544, 12548], [12590, 12592], [12687, 12689], [12694, 12703], [12728, 12783],
255 | [12800, 12831], [12842, 12880], [12896, 12927], [12938, 12976], [12992, 13311],
256 | [19894, 19967], [40908, 40959], [42125, 42191], [42238, 42239], [42509, 42511],
257 | [42540, 42559], [42592, 42593], [42607, 42622], [42648, 42655], [42736, 42774],
258 | [42784, 42785], [42889, 42890], [42893, 43002], [43043, 43055], [43062, 43071],
259 | [43124, 43137], [43188, 43215], [43226, 43249], [43256, 43258], [43260, 43263],
260 | [43302, 43311], [43335, 43359], [43389, 43395], [43443, 43470], [43482, 43519],
261 | [43561, 43583], [43596, 43599], [43610, 43615], [43639, 43641], [43643, 43647],
262 | [43698, 43700], [43703, 43704], [43710, 43711], [43715, 43738], [43742, 43967],
263 | [44003, 44015], [44026, 44031], [55204, 55215], [55239, 55242], [55292, 55295],
264 | [57344, 63743], [64046, 64047], [64110, 64111], [64218, 64255], [64263, 64274],
265 | [64280, 64284], [64434, 64466], [64830, 64847], [64912, 64913], [64968, 65007],
266 | [65020, 65135], [65277, 65295], [65306, 65312], [65339, 65344], [65371, 65381],
267 | [65471, 65473], [65480, 65481], [65488, 65489], [65496, 65497]];
268 | for (i = 0; i < ranges.length; i++) {
269 | start = ranges[i][0];
270 | end = ranges[i][1];
271 | for (j = start; j <= end; j++) {
272 | result[j] = true;
273 | }
274 | }
275 | return result;
276 | })();
277 |
278 | function splitQuery(query) {
279 | var result = [];
280 | var start = -1;
281 | for (var i = 0; i < query.length; i++) {
282 | if (splitChars[query.charCodeAt(i)]) {
283 | if (start !== -1) {
284 | result.push(query.slice(start, i));
285 | start = -1;
286 | }
287 | } else if (start === -1) {
288 | start = i;
289 | }
290 | }
291 | if (start !== -1) {
292 | result.push(query.slice(start));
293 | }
294 | return result;
295 | }
296 |
297 |
298 |
--------------------------------------------------------------------------------
/docs/_static/minus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/minus.png
--------------------------------------------------------------------------------
/docs/_static/plus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/plus.png
--------------------------------------------------------------------------------
/docs/_static/pygments.css:
--------------------------------------------------------------------------------
1 | .highlight .hll { background-color: #ffffcc }
2 | .highlight { background: #eeffcc; }
3 | .highlight .c { color: #408090; font-style: italic } /* Comment */
4 | .highlight .err { border: 1px solid #FF0000 } /* Error */
5 | .highlight .k { color: #007020; font-weight: bold } /* Keyword */
6 | .highlight .o { color: #666666 } /* Operator */
7 | .highlight .ch { color: #408090; font-style: italic } /* Comment.Hashbang */
8 | .highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */
9 | .highlight .cp { color: #007020 } /* Comment.Preproc */
10 | .highlight .cpf { color: #408090; font-style: italic } /* Comment.PreprocFile */
11 | .highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */
12 | .highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */
13 | .highlight .gd { color: #A00000 } /* Generic.Deleted */
14 | .highlight .ge { font-style: italic } /* Generic.Emph */
15 | .highlight .gr { color: #FF0000 } /* Generic.Error */
16 | .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
17 | .highlight .gi { color: #00A000 } /* Generic.Inserted */
18 | .highlight .go { color: #333333 } /* Generic.Output */
19 | .highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
20 | .highlight .gs { font-weight: bold } /* Generic.Strong */
21 | .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
22 | .highlight .gt { color: #0044DD } /* Generic.Traceback */
23 | .highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */
24 | .highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
25 | .highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */
26 | .highlight .kp { color: #007020 } /* Keyword.Pseudo */
27 | .highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */
28 | .highlight .kt { color: #902000 } /* Keyword.Type */
29 | .highlight .m { color: #208050 } /* Literal.Number */
30 | .highlight .s { color: #4070a0 } /* Literal.String */
31 | .highlight .na { color: #4070a0 } /* Name.Attribute */
32 | .highlight .nb { color: #007020 } /* Name.Builtin */
33 | .highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */
34 | .highlight .no { color: #60add5 } /* Name.Constant */
35 | .highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
36 | .highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */
37 | .highlight .ne { color: #007020 } /* Name.Exception */
38 | .highlight .nf { color: #06287e } /* Name.Function */
39 | .highlight .nl { color: #002070; font-weight: bold } /* Name.Label */
40 | .highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
41 | .highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */
42 | .highlight .nv { color: #bb60d5 } /* Name.Variable */
43 | .highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */
44 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */
45 | .highlight .mb { color: #208050 } /* Literal.Number.Bin */
46 | .highlight .mf { color: #208050 } /* Literal.Number.Float */
47 | .highlight .mh { color: #208050 } /* Literal.Number.Hex */
48 | .highlight .mi { color: #208050 } /* Literal.Number.Integer */
49 | .highlight .mo { color: #208050 } /* Literal.Number.Oct */
50 | .highlight .sa { color: #4070a0 } /* Literal.String.Affix */
51 | .highlight .sb { color: #4070a0 } /* Literal.String.Backtick */
52 | .highlight .sc { color: #4070a0 } /* Literal.String.Char */
53 | .highlight .dl { color: #4070a0 } /* Literal.String.Delimiter */
54 | .highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */
55 | .highlight .s2 { color: #4070a0 } /* Literal.String.Double */
56 | .highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */
57 | .highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */
58 | .highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */
59 | .highlight .sx { color: #c65d09 } /* Literal.String.Other */
60 | .highlight .sr { color: #235388 } /* Literal.String.Regex */
61 | .highlight .s1 { color: #4070a0 } /* Literal.String.Single */
62 | .highlight .ss { color: #517918 } /* Literal.String.Symbol */
63 | .highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
64 | .highlight .fm { color: #06287e } /* Name.Function.Magic */
65 | .highlight .vc { color: #bb60d5 } /* Name.Variable.Class */
66 | .highlight .vg { color: #bb60d5 } /* Name.Variable.Global */
67 | .highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */
68 | .highlight .vm { color: #bb60d5 } /* Name.Variable.Magic */
69 | .highlight .il { color: #208050 } /* Literal.Number.Integer.Long */
--------------------------------------------------------------------------------
/docs/_static/readme-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/readme-1.png
--------------------------------------------------------------------------------
/docs/_static/readme-10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/readme-10.png
--------------------------------------------------------------------------------
/docs/_static/readme-11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/readme-11.png
--------------------------------------------------------------------------------
/docs/_static/readme-12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/readme-12.png
--------------------------------------------------------------------------------
/docs/_static/readme-13.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/readme-13.png
--------------------------------------------------------------------------------
/docs/_static/readme-14.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/readme-14.png
--------------------------------------------------------------------------------
/docs/_static/readme-15.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/readme-15.png
--------------------------------------------------------------------------------
/docs/_static/readme-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/readme-16.png
--------------------------------------------------------------------------------
/docs/_static/readme-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/readme-2.png
--------------------------------------------------------------------------------
/docs/_static/readme-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/readme-3.png
--------------------------------------------------------------------------------
/docs/_static/readme-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/readme-4.png
--------------------------------------------------------------------------------
/docs/_static/readme-5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/readme-5.png
--------------------------------------------------------------------------------
/docs/_static/readme-6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/readme-6.png
--------------------------------------------------------------------------------
/docs/_static/readme-7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/readme-7.png
--------------------------------------------------------------------------------
/docs/_static/readme-8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/readme-8.png
--------------------------------------------------------------------------------
/docs/_static/readme-9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/readme-9.png
--------------------------------------------------------------------------------
/docs/_static/searchtools.js:
--------------------------------------------------------------------------------
1 | /*
2 | * searchtools.js
3 | * ~~~~~~~~~~~~~~~~
4 | *
5 | * Sphinx JavaScript utilities for the full-text search.
6 | *
7 | * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
8 | * :license: BSD, see LICENSE for details.
9 | *
10 | */
11 |
12 | if (!Scorer) {
13 | /**
14 | * Simple result scoring code.
15 | */
16 | var Scorer = {
17 | // Implement the following function to further tweak the score for each result
18 | // The function takes a result array [filename, title, anchor, descr, score]
19 | // and returns the new score.
20 | /*
21 | score: function(result) {
22 | return result[4];
23 | },
24 | */
25 |
26 | // query matches the full name of an object
27 | objNameMatch: 11,
28 | // or matches in the last dotted part of the object name
29 | objPartialMatch: 6,
30 | // Additive scores depending on the priority of the object
31 | objPrio: {0: 15, // used to be importantResults
32 | 1: 5, // used to be objectResults
33 | 2: -5}, // used to be unimportantResults
34 | // Used when the priority is not in the mapping.
35 | objPrioDefault: 0,
36 |
37 | // query found in title
38 | title: 15,
39 | partialTitle: 7,
40 | // query found in terms
41 | term: 5,
42 | partialTerm: 2
43 | };
44 | }
45 |
46 | if (!splitQuery) {
47 | function splitQuery(query) {
48 | return query.split(/\s+/);
49 | }
50 | }
51 |
52 | /**
53 | * Search Module
54 | */
55 | var Search = {
56 |
57 | _index : null,
58 | _queued_query : null,
59 | _pulse_status : -1,
60 |
61 | htmlToText : function(htmlString) {
62 | var htmlElement = document.createElement('span');
63 | htmlElement.innerHTML = htmlString;
64 | $(htmlElement).find('.headerlink').remove();
65 | docContent = $(htmlElement).find('[role=main]')[0];
66 | return docContent.textContent || docContent.innerText;
67 | },
68 |
69 | init : function() {
70 | var params = $.getQueryParameters();
71 | if (params.q) {
72 | var query = params.q[0];
73 | $('input[name="q"]')[0].value = query;
74 | this.performSearch(query);
75 | }
76 | },
77 |
78 | loadIndex : function(url) {
79 | $.ajax({type: "GET", url: url, data: null,
80 | dataType: "script", cache: true,
81 | complete: function(jqxhr, textstatus) {
82 | if (textstatus != "success") {
83 | document.getElementById("searchindexloader").src = url;
84 | }
85 | }});
86 | },
87 |
88 | setIndex : function(index) {
89 | var q;
90 | this._index = index;
91 | if ((q = this._queued_query) !== null) {
92 | this._queued_query = null;
93 | Search.query(q);
94 | }
95 | },
96 |
97 | hasIndex : function() {
98 | return this._index !== null;
99 | },
100 |
101 | deferQuery : function(query) {
102 | this._queued_query = query;
103 | },
104 |
105 | stopPulse : function() {
106 | this._pulse_status = 0;
107 | },
108 |
109 | startPulse : function() {
110 | if (this._pulse_status >= 0)
111 | return;
112 | function pulse() {
113 | var i;
114 | Search._pulse_status = (Search._pulse_status + 1) % 4;
115 | var dotString = '';
116 | for (i = 0; i < Search._pulse_status; i++)
117 | dotString += '.';
118 | Search.dots.text(dotString);
119 | if (Search._pulse_status > -1)
120 | window.setTimeout(pulse, 500);
121 | }
122 | pulse();
123 | },
124 |
125 | /**
126 | * perform a search for something (or wait until index is loaded)
127 | */
128 | performSearch : function(query) {
129 | // create the required interface elements
130 | this.out = $('#search-results');
131 | this.title = $('' + _('Searching') + ' ').appendTo(this.out);
132 | this.dots = $(' ').appendTo(this.title);
133 | this.status = $('
').appendTo(this.out);
134 | this.output = $('').appendTo(this.out);
135 |
136 | $('#search-progress').text(_('Preparing search...'));
137 | this.startPulse();
138 |
139 | // index already loaded, the browser was quick!
140 | if (this.hasIndex())
141 | this.query(query);
142 | else
143 | this.deferQuery(query);
144 | },
145 |
146 | /**
147 | * execute search (requires search index to be loaded)
148 | */
149 | query : function(query) {
150 | var i;
151 |
152 | // stem the searchterms and add them to the correct list
153 | var stemmer = new Stemmer();
154 | var searchterms = [];
155 | var excluded = [];
156 | var hlterms = [];
157 | var tmp = splitQuery(query);
158 | var objectterms = [];
159 | for (i = 0; i < tmp.length; i++) {
160 | if (tmp[i] !== "") {
161 | objectterms.push(tmp[i].toLowerCase());
162 | }
163 |
164 | if ($u.indexOf(stopwords, tmp[i].toLowerCase()) != -1 || tmp[i].match(/^\d+$/) ||
165 | tmp[i] === "") {
166 | // skip this "word"
167 | continue;
168 | }
169 | // stem the word
170 | var word = stemmer.stemWord(tmp[i].toLowerCase());
171 | // prevent stemmer from cutting word smaller than two chars
172 | if(word.length < 3 && tmp[i].length >= 3) {
173 | word = tmp[i];
174 | }
175 | var toAppend;
176 | // select the correct list
177 | if (word[0] == '-') {
178 | toAppend = excluded;
179 | word = word.substr(1);
180 | }
181 | else {
182 | toAppend = searchterms;
183 | hlterms.push(tmp[i].toLowerCase());
184 | }
185 | // only add if not already in the list
186 | if (!$u.contains(toAppend, word))
187 | toAppend.push(word);
188 | }
189 | var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" "));
190 |
191 | // console.debug('SEARCH: searching for:');
192 | // console.info('required: ', searchterms);
193 | // console.info('excluded: ', excluded);
194 |
195 | // prepare search
196 | var terms = this._index.terms;
197 | var titleterms = this._index.titleterms;
198 |
199 | // array of [filename, title, anchor, descr, score]
200 | var results = [];
201 | $('#search-progress').empty();
202 |
203 | // lookup as object
204 | for (i = 0; i < objectterms.length; i++) {
205 | var others = [].concat(objectterms.slice(0, i),
206 | objectterms.slice(i+1, objectterms.length));
207 | results = results.concat(this.performObjectSearch(objectterms[i], others));
208 | }
209 |
210 | // lookup as search terms in fulltext
211 | results = results.concat(this.performTermsSearch(searchterms, excluded, terms, titleterms));
212 |
213 | // let the scorer override scores with a custom scoring function
214 | if (Scorer.score) {
215 | for (i = 0; i < results.length; i++)
216 | results[i][4] = Scorer.score(results[i]);
217 | }
218 |
219 | // now sort the results by score (in opposite order of appearance, since the
220 | // display function below uses pop() to retrieve items) and then
221 | // alphabetically
222 | results.sort(function(a, b) {
223 | var left = a[4];
224 | var right = b[4];
225 | if (left > right) {
226 | return 1;
227 | } else if (left < right) {
228 | return -1;
229 | } else {
230 | // same score: sort alphabetically
231 | left = a[1].toLowerCase();
232 | right = b[1].toLowerCase();
233 | return (left > right) ? -1 : ((left < right) ? 1 : 0);
234 | }
235 | });
236 |
237 | // for debugging
238 | //Search.lastresults = results.slice(); // a copy
239 | //console.info('search results:', Search.lastresults);
240 |
241 | // print the results
242 | var resultCount = results.length;
243 | function displayNextItem() {
244 | // results left, load the summary and display it
245 | if (results.length) {
246 | var item = results.pop();
247 | var listItem = $(' ');
248 | if (DOCUMENTATION_OPTIONS.FILE_SUFFIX === '') {
249 | // dirhtml builder
250 | var dirname = item[0] + '/';
251 | if (dirname.match(/\/index\/$/)) {
252 | dirname = dirname.substring(0, dirname.length-6);
253 | } else if (dirname == 'index/') {
254 | dirname = '';
255 | }
256 | listItem.append($(' ').attr('href',
257 | DOCUMENTATION_OPTIONS.URL_ROOT + dirname +
258 | highlightstring + item[2]).html(item[1]));
259 | } else {
260 | // normal html builders
261 | listItem.append($(' ').attr('href',
262 | item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
263 | highlightstring + item[2]).html(item[1]));
264 | }
265 | if (item[3]) {
266 | listItem.append($(' (' + item[3] + ') '));
267 | Search.output.append(listItem);
268 | listItem.slideDown(5, function() {
269 | displayNextItem();
270 | });
271 | } else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
272 | $.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX,
273 | dataType: "text",
274 | complete: function(jqxhr, textstatus) {
275 | var data = jqxhr.responseText;
276 | if (data !== '' && data !== undefined) {
277 | listItem.append(Search.makeSearchSummary(data, searchterms, hlterms));
278 | }
279 | Search.output.append(listItem);
280 | listItem.slideDown(5, function() {
281 | displayNextItem();
282 | });
283 | }});
284 | } else {
285 | // no source available, just display title
286 | Search.output.append(listItem);
287 | listItem.slideDown(5, function() {
288 | displayNextItem();
289 | });
290 | }
291 | }
292 | // search finished, update title and status message
293 | else {
294 | Search.stopPulse();
295 | Search.title.text(_('Search Results'));
296 | if (!resultCount)
297 | Search.status.text(_('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.'));
298 | else
299 | Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount));
300 | Search.status.fadeIn(500);
301 | }
302 | }
303 | displayNextItem();
304 | },
305 |
306 | /**
307 | * search for object names
308 | */
309 | performObjectSearch : function(object, otherterms) {
310 | var filenames = this._index.filenames;
311 | var docnames = this._index.docnames;
312 | var objects = this._index.objects;
313 | var objnames = this._index.objnames;
314 | var titles = this._index.titles;
315 |
316 | var i;
317 | var results = [];
318 |
319 | for (var prefix in objects) {
320 | for (var name in objects[prefix]) {
321 | var fullname = (prefix ? prefix + '.' : '') + name;
322 | if (fullname.toLowerCase().indexOf(object) > -1) {
323 | var score = 0;
324 | var parts = fullname.split('.');
325 | // check for different match types: exact matches of full name or
326 | // "last name" (i.e. last dotted part)
327 | if (fullname == object || parts[parts.length - 1] == object) {
328 | score += Scorer.objNameMatch;
329 | // matches in last name
330 | } else if (parts[parts.length - 1].indexOf(object) > -1) {
331 | score += Scorer.objPartialMatch;
332 | }
333 | var match = objects[prefix][name];
334 | var objname = objnames[match[1]][2];
335 | var title = titles[match[0]];
336 | // If more than one term searched for, we require other words to be
337 | // found in the name/title/description
338 | if (otherterms.length > 0) {
339 | var haystack = (prefix + ' ' + name + ' ' +
340 | objname + ' ' + title).toLowerCase();
341 | var allfound = true;
342 | for (i = 0; i < otherterms.length; i++) {
343 | if (haystack.indexOf(otherterms[i]) == -1) {
344 | allfound = false;
345 | break;
346 | }
347 | }
348 | if (!allfound) {
349 | continue;
350 | }
351 | }
352 | var descr = objname + _(', in ') + title;
353 |
354 | var anchor = match[3];
355 | if (anchor === '')
356 | anchor = fullname;
357 | else if (anchor == '-')
358 | anchor = objnames[match[1]][1] + '-' + fullname;
359 | // add custom score for some objects according to scorer
360 | if (Scorer.objPrio.hasOwnProperty(match[2])) {
361 | score += Scorer.objPrio[match[2]];
362 | } else {
363 | score += Scorer.objPrioDefault;
364 | }
365 | results.push([docnames[match[0]], fullname, '#'+anchor, descr, score, filenames[match[0]]]);
366 | }
367 | }
368 | }
369 |
370 | return results;
371 | },
372 |
373 | /**
374 | * search for full-text terms in the index
375 | */
376 | performTermsSearch : function(searchterms, excluded, terms, titleterms) {
377 | var docnames = this._index.docnames;
378 | var filenames = this._index.filenames;
379 | var titles = this._index.titles;
380 |
381 | var i, j, file;
382 | var fileMap = {};
383 | var scoreMap = {};
384 | var results = [];
385 |
386 | // perform the search on the required terms
387 | for (i = 0; i < searchterms.length; i++) {
388 | var word = searchterms[i];
389 | var files = [];
390 | var _o = [
391 | {files: terms[word], score: Scorer.term},
392 | {files: titleterms[word], score: Scorer.title}
393 | ];
394 | // add support for partial matches
395 | if (word.length > 2) {
396 | for (var w in terms) {
397 | if (w.match(word) && !terms[word]) {
398 | _o.push({files: terms[w], score: Scorer.partialTerm})
399 | }
400 | }
401 | for (var w in titleterms) {
402 | if (w.match(word) && !titleterms[word]) {
403 | _o.push({files: titleterms[w], score: Scorer.partialTitle})
404 | }
405 | }
406 | }
407 |
408 | // no match but word was a required one
409 | if ($u.every(_o, function(o){return o.files === undefined;})) {
410 | break;
411 | }
412 | // found search word in contents
413 | $u.each(_o, function(o) {
414 | var _files = o.files;
415 | if (_files === undefined)
416 | return
417 |
418 | if (_files.length === undefined)
419 | _files = [_files];
420 | files = files.concat(_files);
421 |
422 | // set score for the word in each file to Scorer.term
423 | for (j = 0; j < _files.length; j++) {
424 | file = _files[j];
425 | if (!(file in scoreMap))
426 | scoreMap[file] = {}
427 | scoreMap[file][word] = o.score;
428 | }
429 | });
430 |
431 | // create the mapping
432 | for (j = 0; j < files.length; j++) {
433 | file = files[j];
434 | if (file in fileMap)
435 | fileMap[file].push(word);
436 | else
437 | fileMap[file] = [word];
438 | }
439 | }
440 |
441 | // now check if the files don't contain excluded terms
442 | for (file in fileMap) {
443 | var valid = true;
444 |
445 | // check if all requirements are matched
446 | var filteredTermCount = // as search terms with length < 3 are discarded: ignore
447 | searchterms.filter(function(term){return term.length > 2}).length
448 | if (
449 | fileMap[file].length != searchterms.length &&
450 | fileMap[file].length != filteredTermCount
451 | ) continue;
452 |
453 | // ensure that none of the excluded terms is in the search result
454 | for (i = 0; i < excluded.length; i++) {
455 | if (terms[excluded[i]] == file ||
456 | titleterms[excluded[i]] == file ||
457 | $u.contains(terms[excluded[i]] || [], file) ||
458 | $u.contains(titleterms[excluded[i]] || [], file)) {
459 | valid = false;
460 | break;
461 | }
462 | }
463 |
464 | // if we have still a valid result we can add it to the result list
465 | if (valid) {
466 | // select one (max) score for the file.
467 | // for better ranking, we should calculate ranking by using words statistics like basic tf-idf...
468 | var score = $u.max($u.map(fileMap[file], function(w){return scoreMap[file][w]}));
469 | results.push([docnames[file], titles[file], '', null, score, filenames[file]]);
470 | }
471 | }
472 | return results;
473 | },
474 |
475 | /**
476 | * helper function to return a node containing the
477 | * search summary for a given text. keywords is a list
478 | * of stemmed words, hlwords is the list of normal, unstemmed
479 | * words. the first one is used to find the occurrence, the
480 | * latter for highlighting it.
481 | */
482 | makeSearchSummary : function(htmlText, keywords, hlwords) {
483 | var text = Search.htmlToText(htmlText);
484 | var textLower = text.toLowerCase();
485 | var start = 0;
486 | $.each(keywords, function() {
487 | var i = textLower.indexOf(this.toLowerCase());
488 | if (i > -1)
489 | start = i;
490 | });
491 | start = Math.max(start - 120, 0);
492 | var excerpt = ((start > 0) ? '...' : '') +
493 | $.trim(text.substr(start, 240)) +
494 | ((start + 240 - text.length) ? '...' : '');
495 | var rv = $('
').text(excerpt);
496 | $.each(hlwords, function() {
497 | rv = rv.highlightText(this, 'highlighted');
498 | });
499 | return rv;
500 | }
501 | };
502 |
503 | $(document).ready(function() {
504 | Search.init();
505 | });
506 |
--------------------------------------------------------------------------------
/docs/_static/tech.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/_static/tech.jpg
--------------------------------------------------------------------------------
/docs/_static/underscore.js:
--------------------------------------------------------------------------------
1 | // Underscore.js 1.3.1
2 | // (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
3 | // Underscore is freely distributable under the MIT license.
4 | // Portions of Underscore are inspired or borrowed from Prototype,
5 | // Oliver Steele's Functional, and John Resig's Micro-Templating.
6 | // For all details and documentation:
7 | // http://documentcloud.github.com/underscore
8 | (function(){function q(a,c,d){if(a===c)return a!==0||1/a==1/c;if(a==null||c==null)return a===c;if(a._chain)a=a._wrapped;if(c._chain)c=c._wrapped;if(a.isEqual&&b.isFunction(a.isEqual))return a.isEqual(c);if(c.isEqual&&b.isFunction(c.isEqual))return c.isEqual(a);var e=l.call(a);if(e!=l.call(c))return false;switch(e){case "[object String]":return a==String(c);case "[object Number]":return a!=+a?c!=+c:a==0?1/a==1/c:a==+c;case "[object Date]":case "[object Boolean]":return+a==+c;case "[object RegExp]":return a.source==
9 | c.source&&a.global==c.global&&a.multiline==c.multiline&&a.ignoreCase==c.ignoreCase}if(typeof a!="object"||typeof c!="object")return false;for(var f=d.length;f--;)if(d[f]==a)return true;d.push(a);var f=0,g=true;if(e=="[object Array]"){if(f=a.length,g=f==c.length)for(;f--;)if(!(g=f in a==f in c&&q(a[f],c[f],d)))break}else{if("constructor"in a!="constructor"in c||a.constructor!=c.constructor)return false;for(var h in a)if(b.has(a,h)&&(f++,!(g=b.has(c,h)&&q(a[h],c[h],d))))break;if(g){for(h in c)if(b.has(c,
10 | h)&&!f--)break;g=!f}}d.pop();return g}var r=this,G=r._,n={},k=Array.prototype,o=Object.prototype,i=k.slice,H=k.unshift,l=o.toString,I=o.hasOwnProperty,w=k.forEach,x=k.map,y=k.reduce,z=k.reduceRight,A=k.filter,B=k.every,C=k.some,p=k.indexOf,D=k.lastIndexOf,o=Array.isArray,J=Object.keys,s=Function.prototype.bind,b=function(a){return new m(a)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=b;exports._=b}else r._=b;b.VERSION="1.3.1";var j=b.each=
11 | b.forEach=function(a,c,d){if(a!=null)if(w&&a.forEach===w)a.forEach(c,d);else if(a.length===+a.length)for(var e=0,f=a.length;e2;a==
12 | null&&(a=[]);if(y&&a.reduce===y)return e&&(c=b.bind(c,e)),f?a.reduce(c,d):a.reduce(c);j(a,function(a,b,i){f?d=c.call(e,d,a,b,i):(d=a,f=true)});if(!f)throw new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(z&&a.reduceRight===z)return e&&(c=b.bind(c,e)),f?a.reduceRight(c,d):a.reduceRight(c);var g=b.toArray(a).reverse();e&&!f&&(c=b.bind(c,e));return f?b.reduce(g,c,d,e):b.reduce(g,c)};b.find=b.detect=
13 | function(a,c,b){var e;E(a,function(a,g,h){if(c.call(b,a,g,h))return e=a,true});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(A&&a.filter===A)return a.filter(c,b);j(a,function(a,g,h){c.call(b,a,g,h)&&(e[e.length]=a)});return e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,g,h){c.call(b,a,g,h)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=true;if(a==null)return e;if(B&&a.every===B)return a.every(c,b);j(a,function(a,g,h){if(!(e=
14 | e&&c.call(b,a,g,h)))return n});return e};var E=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=false;if(a==null)return e;if(C&&a.some===C)return a.some(c,d);j(a,function(a,b,h){if(e||(e=c.call(d,a,b,h)))return n});return!!e};b.include=b.contains=function(a,c){var b=false;if(a==null)return b;return p&&a.indexOf===p?a.indexOf(c)!=-1:b=E(a,function(a){return a===c})};b.invoke=function(a,c){var d=i.call(arguments,2);return b.map(a,function(a){return(b.isFunction(c)?c||a:a[c]).apply(a,d)})};b.pluck=
15 | function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;bd?1:0}),"value")};b.groupBy=function(a,c){var d={},e=b.isFunction(c)?c:function(a){return a[c]};j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex=function(a,
17 | c,d){d||(d=b.identity);for(var e=0,f=a.length;e>1;d(a[g])=0})})};b.difference=function(a){var c=b.flatten(i.call(arguments,1));return b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a=i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e=0;d--)b=[a[d].apply(this,b)];return b[0]}};
24 | b.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};b.keys=J||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var c=[],d;for(d in a)b.has(a,d)&&(c[c.length]=d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var c=[],d;for(d in a)b.isFunction(a[d])&&c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]=b[d]});return a};b.defaults=function(a){j(i.call(arguments,
25 | 1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,b){return q(a,b,[])};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(b.has(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=o||function(a){return l.call(a)=="[object Array]"};b.isObject=function(a){return a===Object(a)};
26 | b.isArguments=function(a){return l.call(a)=="[object Arguments]"};if(!b.isArguments(arguments))b.isArguments=function(a){return!(!a||!b.has(a,"callee"))};b.isFunction=function(a){return l.call(a)=="[object Function]"};b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return l.call(a)=="[object Number]"};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===true||a===false||l.call(a)=="[object Boolean]"};b.isDate=function(a){return l.call(a)=="[object Date]"};
27 | b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.has=function(a,b){return I.call(a,b)};b.noConflict=function(){r._=G;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=0;e /g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")};b.mixin=function(a){j(b.functions(a),
28 | function(c){K(c,b[c]=a[c])})};var L=0;b.uniqueId=function(a){var b=L++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var t=/.^/,u=function(a){return a.replace(/\\\\/g,"\\").replace(/\\'/g,"'")};b.template=function(a,c){var d=b.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.escape||t,function(a,b){return"',_.escape("+
29 | u(b)+"),'"}).replace(d.interpolate||t,function(a,b){return"',"+u(b)+",'"}).replace(d.evaluate||t,function(a,b){return"');"+u(b).replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",e=new Function("obj","_",d);return c?e(c,b):function(a){return e.call(this,a,b)}};b.chain=function(a){return b(a).chain()};var m=function(a){this._wrapped=a};b.prototype=m.prototype;var v=function(a,c){return c?b(a).chain():a},K=function(a,c){m.prototype[a]=
30 | function(){var a=i.call(arguments);H.call(a,this._wrapped);return v(c.apply(b,a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=k[a];m.prototype[a]=function(){var d=this._wrapped;b.apply(d,arguments);var e=d.length;(a=="shift"||a=="splice")&&e===0&&delete d[0];return v(d,this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];m.prototype[a]=function(){return v(b.apply(this._wrapped,arguments),this._chain)}});m.prototype.chain=function(){this._chain=
31 | true;return this};m.prototype.value=function(){return this._wrapped}}).call(this);
32 |
--------------------------------------------------------------------------------
/docs/genindex.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | Index — xai - eXplainable AI 0.1 documentation
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 | xai - eXplainable AI
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 | Docs »
130 |
131 | Index
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
Index
150 |
151 |
152 |
B
153 | |
C
154 | |
E
155 | |
F
156 | |
G
157 | |
I
158 | |
L
159 | |
M
160 | |
N
161 | |
P
162 | |
R
163 | |
S
164 | |
X
165 |
166 |
167 |
B
168 |
178 |
179 |
C
180 |
194 |
195 |
E
196 |
202 |
203 |
F
204 |
210 |
211 |
G
212 |
218 |
219 |
I
220 |
226 |
227 |
L
228 |
234 |
235 |
M
236 |
242 |
243 |
N
244 |
250 |
251 |
P
252 |
258 |
259 |
R
260 |
266 |
267 |
S
268 |
274 |
275 |
X
276 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
306 |
307 |
308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
316 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
--------------------------------------------------------------------------------
/docs/gettingstarted.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | Getting started guide — xai - eXplainable AI 0.1 documentation
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 | xai - eXplainable AI
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 | Docs »
133 |
134 | Getting started guide
135 |
136 |
137 |
138 |
139 |
140 | View page source
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
Getting started guide
155 |
156 |
157 |
Welcome to the XAI
documentation. Here you will find everything
158 |
159 |
160 |
Indices and tables
161 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
--------------------------------------------------------------------------------
/docs/objects.inv:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs/objects.inv
--------------------------------------------------------------------------------
/docs/py-modindex.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | Python Module Index — xai - eXplainable AI 0.1 documentation
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 | xai - eXplainable AI
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 | Docs »
132 |
133 | Python Module Index
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
Python Module Index
150 |
151 |
154 |
155 |
156 |
157 |
158 | x
159 |
160 |
162 |
163 | xai
164 |
165 |
166 |
168 |
169 | xai
170 |
171 |
172 |
173 |
174 | xai.data
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
--------------------------------------------------------------------------------
/docs/search.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | Search — xai - eXplainable AI 0.1 documentation
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 | xai - eXplainable AI
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 | Docs »
130 |
131 | Search
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 | Please activate JavaScript to enable the search
152 | functionality.
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
194 |
195 |
196 |
197 |
198 |
199 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
--------------------------------------------------------------------------------
/docs/searchindex.js:
--------------------------------------------------------------------------------
1 | Search.setIndex({docnames:["gettingstarted","index","xai"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,sphinx:56},filenames:["gettingstarted.rst","index.rst","xai.rst"],objects:{"":{xai:[1,0,0,"-"]},"xai.data":{load_census:[1,1,1,""]},xai:{balance:[1,1,1,""],balanced_train_test_split:[1,1,1,""],confusion_matrix_plot:[1,1,1,""],convert_categories:[1,1,1,""],convert_probs:[1,1,1,""],correlations:[1,1,1,""],data:[1,0,0,"-"],evaluation_metrics:[1,1,1,""],feature_importance:[1,1,1,""],group_by_columns:[1,1,1,""],imbalance_plot:[1,1,1,""],metrics_plot:[1,1,1,""],normalize_numeric:[1,1,1,""],pr_plot:[1,1,1,""],roc_plot:[1,1,1,""],smile_imbalance:[1,1,1,""]}},objnames:{"0":["py","module","Python module"],"1":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:function"},terms:{"boolean":1,"default":1,"float":1,"function":1,"int":1,"null":1,"return":1,"throw":1,"true":1,For:1,One:1,The:1,These:1,Will:1,With:1,abl:1,abov:1,achiev:1,across:1,actual:1,actual_label:1,adult:1,age:1,algorithm:1,also:1,altern:1,analys:1,ani:1,approv:1,arg:1,argument:1,arrai:1,astyp:1,auc:1,autom:1,avail:1,axi:1,bal_df:1,balance_on:1,balanced_train_test_split:1,bare:1,base:1,batch_siz:1,behaviour:1,best:1,between:1,bin:1,binari:1,binary_target_label:1,bool:1,broadli:1,build_model:1,built:[],calcul:1,can:1,cat_df:1,categor:1,categori:1,categorical_col:1,censu:1,challeng:1,chart:1,check:1,choos:1,class_count:1,classifi:1,clone:1,code:1,col:1,com:1,combin:1,comput:1,conceiv:1,confus:1,confusion_matrix_plot:1,construct:1,contain:1,convert:1,convert_categori:1,convert_prob:1,copi:1,core:1,correl:1,cross:1,cross_col:1,cross_cross:[],current:1,datafram:1,dataframegroupbi:1,datapoint:1,dataset:1,deep:1,def:1,definit:1,dendogram:1,design:1,detail:1,develop:1,deviat:1,df_data:1,df_group:1,df_metric:1,df_test:1,diagram:1,dict:1,dictionari:1,discrep:1,displai:1,display_breakdown:1,divid:1,document:[0,1],domain:1,draw:1,drawn:1,drop:1,dtype:1,due:1,dure:1,each:1,earli:1,element:1,empow:1,empti:1,enabl:1,end:1,engin:1,enough:1,epoch:1,equal:1,error:1,etc:1,ethic:1,ethicalml:1,ethnic:1,evaluation_metr:1,everyth:0,exampl:1,except:1,exclud:1,exclude_metr:1,expect:1,expert:1,explicitli:1,f_in:1,fallback:1,fallback_typ:1,fals:1,fast:1,feature_import:1,femal:1,find:[0,1],first:1,fit:1,folder:1,follow:1,frame:[],frequenc:1,from:1,full:1,func:1,gender:1,get:1,get_avg:1,github:1,global:1,group_by_column:1,groupbi:1,grouped_df:1,guid:1,guidanc:1,half:1,head:1,henc:1,here:[0,1],higher:1,highest:1,html:1,http:1,idea:1,ideal:1,ignor:1,imag:1,imbalance_plot:1,imp:1,ims:1,includ:1,include_categor:1,index:[0,1],infer:1,input:1,insight:1,instanc:1,instead:1,institut:1,interact:1,intern:1,involv:1,item:1,its:1,just:1,knowledg:1,label:1,label_x_neg:1,label_x_po:1,label_y_neg:1,label_y_po:1,labl:1,layer:1,less:1,librari:1,like:1,line:1,list:1,load:1,load_censu:1,loan:1,london:1,look:1,lower:1,mai:1,main:1,maintain:1,male:1,manual_review:1,matrix:1,max_per_group:1,maximum:1,meantim:1,mechan:1,mention:1,metrics_imbal:1,metrics_plot:1,min_per_class:1,min_per_group:1,mind:1,minimum:1,monitor:1,more:1,multiarrai:[],name:1,ndarrai:1,need:1,neg:1,none:1,norm_df:1,normal:1,normalize_numer:1,noth:1,number:1,numer:1,numerci:1,numerical_col:1,numpi:1,object:1,ones:1,onli:1,optim:1,option:1,other_numeric_attribut:1,otherwis:1,our:1,out:1,over:1,overview:1,packag:1,page:0,panda:1,param:1,paramet:1,part:1,pass:1,per:1,percentag:1,perform:1,pip:1,pleas:1,plot:1,plot_threshold:1,plot_typ:1,plt_kwarg:1,posit:1,pr_imbal:1,pr_plot:1,practic:1,pred:1,predict:1,predicted_label:1,predictedd:1,principl:1,print:1,prob:1,proc_df:1,process:1,product:1,protected_col:1,provid:1,pypi:1,quick:1,quit:1,random:1,random_st:1,reject:1,rel:1,relev:1,repeat:1,replac:1,repo:1,repositori:1,request:1,requir:1,respons:1,result:1,return_xi:1,roc_imbal:1,roc_plot:1,rtype:1,run:1,sampl:1,scale:1,scienc:1,search:0,see:1,seed:1,set:1,setup:1,show:1,show_imbal:1,singl:1,smile_imbal:1,solut:1,sourc:1,specif:1,stage:1,standard:1,start:1,step:1,str:1,string:1,sub:1,subcategori:1,substract:1,take:1,talk:1,target:1,tensorflow:1,test_idx:1,than:1,thi:1,those:1,three:1,through:1,titl:0,tool:1,total:1,toward:1,train_idx:1,trane:1,treat:1,trigger:1,tupl:1,type:1,under:1,union:1,unstabl:1,updat:1,use:1,used:1,uses:1,valu:1,variou:1,verbos:1,visual:1,want:1,welcom:0,when:1,where:1,whether:1,which:1,within:1,would:1,x_test:1,x_train:1,xai:0,y_actual:1,y_pred:1,y_predict:1,y_test:1,y_train:1,y_valid:1,you:[0,1]},titles:["Getting started guide","Welcome to the XAI docs - eXplainable machine learning","<no title>"],titleterms:{"class":1,"import":1,about:1,accuraci:1,adding:1,against:1,all:1,alpha:1,analysi:1,anoth:1,balanc:1,benefit:1,bucket:1,column:1,content:1,creat:1,curv:1,data:1,doc:1,docstr:1,done:1,downsampl:1,evalu:1,explain:1,featur:1,get:0,group:1,guid:0,identifi:1,imbal:1,indic:0,instal:1,intersect:1,learn:1,machin:1,manual:1,mean:1,metric:1,model:1,modul:1,one:1,permut:1,pre:1,precis:1,probabl:1,protect:1,python:1,quickstart:1,recal:1,review:1,roc:1,should:1,split:1,start:0,statist:1,submodul:1,tabl:0,test:1,threshold:1,train:1,upsampl:1,usag:1,using:1,version:1,view:1,visualis:1,welcom:1,what:1,xai:1}})
--------------------------------------------------------------------------------
/docs/xai.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | <no title> — xai - eXplainable AI 0.1 documentation
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 | xai - eXplainable AI
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 | Docs »
131 |
132 | <no title>
133 |
134 |
135 |
136 |
137 |
138 | View page source
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
--------------------------------------------------------------------------------
/docs_src/Makefile:
--------------------------------------------------------------------------------
1 | # Minimal makefile for Sphinx documentation
2 | #
3 |
4 | # You can set these variables from the command line.
5 | SPHINXOPTS =
6 | SPHINXBUILD = python -msphinx
7 | SPHINXPROJ = xai
8 | SOURCEDIR = source
9 | BUILDDIR = build
10 |
11 | # Put it first so that "make" without argument is like "make help".
12 | help:
13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14 |
15 | .PHONY: help Makefile
16 |
17 | # Catch-all target: route all unknown targets to Sphinx using the new
18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19 | %: Makefile
20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
21 | rm -rf ../docs/*
22 | cp -r build/html/* ../docs
23 | touch ../docs/.nojekyll ../docs/_static/.nojekyll ../docs/_static/js/.nojekyll ../docs/_static/css/.nojekyll ../docs/_static/fonts/.nojekyll
24 |
--------------------------------------------------------------------------------
/docs_src/make.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 |
3 | pushd %~dp0
4 |
5 | REM Command file for Sphinx documentation
6 |
7 | if "%SPHINXBUILD%" == "" (
8 | set SPHINXBUILD=python -msphinx
9 | )
10 | set SOURCEDIR=source
11 | set BUILDDIR=build
12 | set SPHINXPROJ=xai-eXplainableAI
13 |
14 | if "%1" == "" goto help
15 |
16 | %SPHINXBUILD% >NUL 2>NUL
17 | if errorlevel 9009 (
18 | echo.
19 | echo.The Sphinx module was not found. Make sure you have Sphinx installed,
20 | echo.then set the SPHINXBUILD environment variable to point to the full
21 | echo.path of the 'sphinx-build' executable. Alternatively you may add the
22 | echo.Sphinx directory to PATH.
23 | echo.
24 | echo.If you don't have Sphinx installed, grab it from
25 | echo.http://sphinx-doc.org/
26 | exit /b 1
27 | )
28 |
29 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
30 | goto end
31 |
32 | :help
33 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
34 |
35 | :end
36 | popd
37 |
--------------------------------------------------------------------------------
/docs_src/source/_static/bias.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs_src/source/_static/bias.png
--------------------------------------------------------------------------------
/docs_src/source/_static/readme-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs_src/source/_static/readme-1.png
--------------------------------------------------------------------------------
/docs_src/source/_static/readme-10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs_src/source/_static/readme-10.png
--------------------------------------------------------------------------------
/docs_src/source/_static/readme-11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs_src/source/_static/readme-11.png
--------------------------------------------------------------------------------
/docs_src/source/_static/readme-12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs_src/source/_static/readme-12.png
--------------------------------------------------------------------------------
/docs_src/source/_static/readme-13.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs_src/source/_static/readme-13.png
--------------------------------------------------------------------------------
/docs_src/source/_static/readme-14.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs_src/source/_static/readme-14.png
--------------------------------------------------------------------------------
/docs_src/source/_static/readme-15.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs_src/source/_static/readme-15.png
--------------------------------------------------------------------------------
/docs_src/source/_static/readme-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs_src/source/_static/readme-16.png
--------------------------------------------------------------------------------
/docs_src/source/_static/readme-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs_src/source/_static/readme-2.png
--------------------------------------------------------------------------------
/docs_src/source/_static/readme-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs_src/source/_static/readme-3.png
--------------------------------------------------------------------------------
/docs_src/source/_static/readme-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs_src/source/_static/readme-4.png
--------------------------------------------------------------------------------
/docs_src/source/_static/readme-5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs_src/source/_static/readme-5.png
--------------------------------------------------------------------------------
/docs_src/source/_static/readme-6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs_src/source/_static/readme-6.png
--------------------------------------------------------------------------------
/docs_src/source/_static/readme-7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs_src/source/_static/readme-7.png
--------------------------------------------------------------------------------
/docs_src/source/_static/readme-8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs_src/source/_static/readme-8.png
--------------------------------------------------------------------------------
/docs_src/source/_static/readme-9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs_src/source/_static/readme-9.png
--------------------------------------------------------------------------------
/docs_src/source/_static/tech.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs_src/source/_static/tech.jpg
--------------------------------------------------------------------------------
/docs_src/source/conf.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding: utf-8 -*-
3 | #
4 | # xai - eXplainable AI documentation build configuration file, created by
5 | # sphinx-quickstart on Fri Jun 23 15:52:18 2017.
6 | #
7 | # This file is execfile()d with the current directory set to its
8 | # containing dir.
9 | #
10 | # Note that not all possible configuration values are present in this
11 | # autogenerated file.
12 | #
13 | # All configuration values have a default; values that are commented out
14 | # serve to show the default.
15 |
16 | # If extensions (or modules to document with autodoc) are in another directory,
17 | # add these directories to sys.path here. If the directory is relative to the
18 | # documentation root, use os.path.abspath to make it absolute, like shown here.
19 | #
20 | import os
21 | import sys
22 | sys.path.insert(0, os.path.abspath('../..'))
23 | print(sys.path)
24 |
25 | # -- General configuration ------------------------------------------------
26 |
27 | # If your documentation needs a minimal Sphinx version, state it here.
28 | #
29 | # needs_sphinx = '1.0'
30 |
31 | # Add any Sphinx extension module names here, as strings. They can be
32 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
33 | # ones.
34 | extensions = [
35 | 'sphinx.ext.autodoc',
36 | 'sphinxcontrib.napoleon',
37 | 'sphinx_autodoc_typehints',
38 | ]
39 |
40 | html_sidebars = {'**': ['localtoc.html', 'sourcelink.html', 'searchbox.html']}
41 |
42 | # Add any paths that contain templates here, relative to this directory.
43 | templates_path = ['_templates']
44 |
45 | # The suffix(es) of source filenames.
46 | # You can specify multiple suffix as a list of string:
47 | #
48 | # source_suffix = ['.rst', '.md']
49 | source_suffix = '.rst'
50 |
51 | # The master toctree document.
52 | master_doc = 'index'
53 |
54 | # General information about the project.
55 | project = 'xai - eXplainable AI'
56 | copyright = '2018, Alejandro Saucedo'
57 | author = 'Alejandro Saucedo'
58 |
59 | # The version info for the project you're documenting, acts as replacement for
60 | # |version| and |release|, also used in various other places throughout the
61 | # built documents.
62 | #
63 | # The short X.Y version.
64 | version = '0.1'
65 | # The full version, including alpha/beta/rc tags.
66 | release = '0.1'
67 |
68 | # The language for content autogenerated by Sphinx. Refer to documentation
69 | # for a list of supported languages.
70 | #
71 | # This is also used if you do content translation via gettext catalogs.
72 | # Usually you set "language" from the command line for these cases.
73 | language = None
74 |
75 | # List of patterns, relative to source directory, that match files and
76 | # directories to ignore when looking for source files.
77 | # This patterns also effect to html_static_path and html_extra_path
78 | exclude_patterns = []
79 |
80 | # The name of the Pygments (syntax highlighting) style to use.
81 | pygments_style = 'sphinx'
82 |
83 | # If true, `todo` and `todoList` produce output, else they produce nothing.
84 | todo_include_todos = False
85 |
86 |
87 | # -- Options for HTML output ----------------------------------------------
88 |
89 | # The theme to use for HTML and HTML Help pages. See the documentation for
90 | # a list of builtin themes.
91 | #
92 | import sphinx_rtd_theme
93 | html_theme = "sphinx_rtd_theme"
94 | html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
95 | html_theme_options = {
96 | 'navigation_depth': 4,
97 | }
98 |
99 | # Theme options are theme-specific and customize the look and feel of a theme
100 | # further. For a list of options available for each theme, see the
101 | # documentation.
102 | #
103 | # html_theme_options = {}
104 |
105 | # Add any paths that contain custom static files (such as style sheets) here,
106 | # relative to this directory. They are copied after the builtin static files,
107 | # so a file named "default.css" will overwrite the builtin "default.css".
108 | html_static_path = ['_static']
109 |
110 |
111 | # -- Options for HTMLHelp output ------------------------------------------
112 |
113 | # Output file base name for HTML help builder.
114 | htmlhelp_basename = 'xai-eXplainableAIdoc'
115 |
116 |
117 | # -- Options for LaTeX output ---------------------------------------------
118 |
119 | latex_elements = {
120 | # The paper size ('letterpaper' or 'a4paper').
121 | #
122 | # 'papersize': 'letterpaper',
123 |
124 | # The font size ('10pt', '11pt' or '12pt').
125 | #
126 | # 'pointsize': '10pt',
127 |
128 | # Additional stuff for the LaTeX preamble.
129 | #
130 | # 'preamble': '',
131 |
132 | # Latex figure (float) alignment
133 | #
134 | # 'figure_align': 'htbp',
135 | }
136 |
137 | # Grouping the document tree into LaTeX files. List of tuples
138 | # (source start file, target name, title,
139 | # author, documentclass [howto, manual, or own class]).
140 | latex_documents = [
141 | (master_doc, 'xai-eXplainableAI.tex', 'xai - eXplainable AI Documentation',
142 | 'Alejandro Saucedo', 'manual'),
143 | ]
144 |
145 |
146 | # -- Options for manual page output ---------------------------------------
147 |
148 | # One entry per manual page. List of tuples
149 | # (source start file, name, description, authors, manual section).
150 | man_pages = [
151 | (master_doc, 'xai-eXplainableAI', 'xai - eXplainable AI Documentation',
152 | [author], 1)
153 | ]
154 |
155 |
156 | # -- Options for Texinfo output -------------------------------------------
157 |
158 | # Grouping the document tree into Texinfo files. List of tuples
159 | # (source start file, target name, title, author,
160 | # dir menu entry, description, category)
161 | texinfo_documents = [
162 | (master_doc, 'xai-eXplainableAI', 'xai - eXplainable AI Documentation',
163 | author, 'xai-eXplainableAI', 'xai - eXplainable AI Documentation.',
164 | 'Miscellaneous'),
165 | ]
166 |
167 |
--------------------------------------------------------------------------------
/docs_src/source/gettingstarted.rst:
--------------------------------------------------------------------------------
1 | Getting started guide
2 | =====================
3 |
4 | .. toctree::
5 | :maxdepth: 1
6 | :caption: Contents:
7 |
8 |
9 | Welcome to the ``XAI`` documentation. Here you will find everything
10 |
11 | Indices and tables
12 | ==================
13 |
14 | * :ref:`genindex`
15 | * :doc:`xai`
16 | * :ref:`search`
17 |
18 |
--------------------------------------------------------------------------------
/docs_src/source/index.rst:
--------------------------------------------------------------------------------
1 | .. xai - WordCount Python documentation master file, created by
2 | sphinx-quickstart on Fri Jun 23 15:52:18 2017.
3 | You can adapt this file completely to your liking, but it should at least
4 | contain the root `toctree` directive.
5 |
6 | Welcome to the XAI docs - eXplainable machine learning
7 | ===========================================================
8 |
9 | .. toctree::
10 | :maxdepth: 4
11 |
12 |
13 | Welcome to the ``xai`` documentation. Here you will the installation guide, the quick start guide, and the detailed docstrings code documentation of the xai library.
14 |
15 | The documentation is currently under construction - for the meantime you can check out the main Github repository for the code (https://github.com/EthicalML/xai).
16 |
17 | About
18 | ================
19 |
20 | XAI is a Machine Learning library that is designed with AI explainability in its core. XAI contains various tools that enable for analysis and evaluation of data and models. The XAI library is maintained by `The Institute for Ethical AI & ML `_, and it was developed based on the `8 principles for Responsible Machine Learning `_.
21 |
22 | You can find the documentation at https://ethicalml.github.io/xai/index.html. You can also check out our `talk at Tensorflow London `_ where the idea was first conceived - the talk also contains an insight on the definitions and principles in this library.
23 |
24 | 0.0.4 - ALPHA Version
25 | ------------------------
26 |
27 | This library is currently in early stage developments and hence it will be quite unstable due to the fast updates. It is important to bare this in mind if using it in production.
28 |
29 | What do we mean by eXplainable AI?
30 | ---------------------------------------
31 |
32 | We see the challenge of explainability as more than just an algorithmic challenge, which requires a combination of data science best practices with domain-specific knowledge. The XAI library is designed to empower machine learning engineers and relevant domain experts to analyse the end-to-end solution and identify discrepancies that may result in sub-optimal performance relative to the objectives required. More broadly, the XAI library is designed using the 3-steps of explainable machine learning, which involve 1) data analysis, 2) model evaluation, and 3) production monitoring.
33 |
34 | We provide a visual overview of these three steps mentioned above in this diagram:
35 |
36 | .. image:: _static/bias.png
37 |
38 | XAI Quickstart
39 | ====================================
40 |
41 | Installation
42 | ------------------
43 |
44 | The XAI package is on PyPI. To install you can run:
45 |
46 | .. parsed-literal::
47 |
48 | pip install xai
49 |
50 | Alternatively you can install from source by cloning the repo and running:
51 |
52 | .. parsed-literal::
53 |
54 | python setup.py install
55 |
56 | Usage
57 | ---------
58 |
59 | You can find example usage in the examples folder.
60 |
61 | 1) Data Analysis
62 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
63 |
64 |
65 | With XAI you can identify imbalances in the data. For this, we will load the census dataset from the XAI library.
66 |
67 | .. parsed-literal::
68 |
69 | import xai.data
70 | df = xai.data.load_census()
71 | df.head()
72 |
73 | .. image:: _static/readme-1.png
74 |
75 | View class imbalances for protected columns
76 | """"""""""""""""""""""""""""""""""""""""""""""""""""""
77 |
78 | .. parsed-literal::
79 |
80 | protected_cols = ["gender", "ethnicity", "age"]
81 | ims = xai.show_imbalances(df, protected_cols)
82 |
83 | .. image:: _static/readme-2.png
84 |
85 | View imbalance of one column
86 | """"""""""""""""""""""""""""""""""""""""""""""""""""""
87 |
88 |
89 | .. parsed-literal::
90 |
91 | im = xai.show_imbalance(df, "gender")
92 |
93 | .. image:: _static/readme-3.png
94 |
95 | View imbalance of one column intersected with another
96 | """"""""""""""""""""""""""""""""""""""""""""""""""""""
97 |
98 |
99 | .. parsed-literal::
100 |
101 | im = xai.show_imbalance(df, "gender", cross=["loan"])
102 |
103 | .. image:: _static/readme-4.png
104 |
105 | Balance the class using upsampling and/or downsampling
106 | """"""""""""""""""""""""""""""""""""""""""""""""""""""
107 |
108 |
109 | .. parsed-literal::
110 | bal_df = xai.balance(df, "gender", cross=["loan"], upsample=1.0)
111 |
112 | .. image:: _static/readme-5.png
113 |
114 | Create a balanced test-train split (should be done pre-balancing)
115 | """"""""""""""""""""""""""""""""""""""""""""""""""""""
116 |
117 |
118 | .. parsed-literal::
119 |
120 | # Balanced train-test split with minimum 300 examples of
121 | # the cross of the target y and the column gender
122 | x_train, y_train, x_test, y_test = xai.balanced_train_test_split(
123 | x, y, cross=["gender"],
124 | categorical_cols=categorical_cols, min_per_class=300)
125 |
126 | # Visualise the imbalances of gender and the target
127 | df_test = x_test.copy()
128 | df_test["loan"] = y_test
129 | _= xai.show_imbalance(df_test, "gender", cross=["loan"], categorical_cols=categorical_cols)
130 |
131 | .. image:: _static/readme-16.png
132 |
133 | 2) Model Evaluation
134 | ^^^^^^^^^^^^^^^^^^^^^^^^^
135 |
136 | We are able to also analyse the interaction between inference results and input features. For this, we will train a single layer deep learning model.
137 |
138 | .. parsed-literal::
139 |
140 | model = build_model(proc_df.drop("loan", axis=1))
141 | model.fit(f_in(x_train), y_train, epochs=50, batch_size=512)
142 |
143 | probabilities = model.predict(f_in(x_test))
144 | predictions = list((probabilities >= 0.5).astype(int).T[0])
145 |
146 | .. image:: _static/readme-15.png
147 |
148 | Visualise permutation feature importance
149 | """"""""""""""""""""""""""""""""""""""""""""""""""""""
150 |
151 |
152 | .. parsed-literal::
153 |
154 | def get_avg(x, y):
155 | return model.evaluate(f_in(x), y, verbose=0)[1]
156 |
157 | imp = xai.feature_importance(x_test, y_test, get_avg)
158 |
159 | imp.head()
160 |
161 | .. image:: _static/readme-6.png
162 |
163 | Identify metric imbalances against all test data
164 | """"""""""""""""""""""""""""""""""""""""""""""""""""""
165 |
166 |
167 | .. parsed-literal::
168 |
169 | _= xai.metrics_imbalance(
170 | x_test,
171 | y_test,
172 | probabilities)
173 |
174 | .. image:: _static/readme-7.png
175 |
176 | Identify metric imbalances grouped by protected columns
177 | """"""""""""""""""""""""""""""""""""""""""""""""""""""
178 |
179 |
180 | .. parsed-literal::
181 | _= xai.metrics_imbalances(
182 | x_test,
183 | y_test,
184 | probabilities,
185 | columns=protected,
186 | categorical_cols=categorical_cols)
187 |
188 | .. image:: _static/readme-8.png
189 |
190 | Visualise the ROC curve against all test data
191 | """"""""""""""""""""""""""""""""""""""""""""""""""""""
192 |
193 |
194 | .. parsed-literal::
195 |
196 | _= xai.roc_imbalance(
197 | x_test,
198 | y_test,
199 | probabilities)
200 |
201 | .. image:: _static/readme-9.png
202 |
203 | Visualise the ROC curves grouped by protected columns
204 | """"""""""""""""""""""""""""""""""""""""""""""""""""""
205 |
206 |
207 | .. parsed-literal::
208 | _= xai.roc_imbalances(
209 | x_test,
210 | y_test,
211 | probabilities,
212 | columns=protected,
213 | categorical_cols=categorical_cols)
214 |
215 | .. image:: _static/readme-10.png
216 |
217 | Visualise the precision-recall curve by protected columns
218 | """"""""""""""""""""""""""""""""""""""""""""""""""""""
219 |
220 |
221 | .. parsed-literal::
222 |
223 | _= xai.pr_imbalances(
224 | x_test,
225 | y_test,
226 | probabilities,
227 | columns=protected,
228 | categorical_cols=categorical_cols)
229 |
230 | .. image:: _static/readme-11.png
231 |
232 | Visualise accuracy grouped by probability buckets
233 | """"""""""""""""""""""""""""""""""""""""""""""""""""""
234 |
235 |
236 | .. parsed-literal::
237 |
238 | d = xai.smile_imbalance(
239 | y_test,
240 | probabilities)
241 |
242 | .. image:: _static/readme-12.png
243 |
244 | Visualise statistical metrics grouped by probability buckets
245 | """"""""""""""""""""""""""""""""""""""""""""""""""""""
246 |
247 |
248 | .. parsed-literal::
249 |
250 | d = xai.smile_imbalance(
251 | y_test,
252 | probabilities,
253 | display_breakdown=True)
254 |
255 | .. image:: _static/readme-13.png
256 |
257 | Visualise benefits of adding manual review on probability thresholds
258 | """"""""""""""""""""""""""""""""""""""""""""""""""""""
259 |
260 |
261 | .. parsed-literal::
262 |
263 | d = xai.smile_imbalance(
264 | y_test,
265 | probabilities,
266 | bins=9,
267 | threshold=0.75,
268 | manual_review=0.375,
269 | display_breakdown=False)
270 |
271 | .. image:: _static/readme-14.png
272 |
273 |
274 |
275 | xai Python Docstrings
276 | ===========================
277 |
278 |
279 | Submodules
280 | ------------
281 |
282 | xai\.data module
283 | -----------------
284 |
285 | .. automodule:: xai.data
286 | :members:
287 | :undoc-members:
288 | :show-inheritance:
289 |
290 |
291 | Module contents
292 | -----------------
293 |
294 | .. automodule:: xai
295 | :members:
296 | :undoc-members:
297 | :show-inheritance:
298 |
299 |
--------------------------------------------------------------------------------
/docs_src/source/xai.rst:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/docs_src/source/xai.rst
--------------------------------------------------------------------------------
/env.yml:
--------------------------------------------------------------------------------
1 | name: xai
2 | channels:
3 | - defaults
4 | - conda-forge
5 | dependencies:
6 | - python
7 | - jupyter
8 | - numpy
9 | - pandas
10 | - matplotlib
11 | - scikit-learn
12 | - seaborn
13 | - spacy
14 | - nb_conda
15 | - keras
16 | - tensorflow
17 | - pip:
18 | - black
19 | - jupyterthemes # jt -t monokai -T -nfs 115 -cellw 98% -N -kl -ofs 11 -altmd
20 | - sphinx
21 | - sphinx_rtd_theme
22 | - sphinxcontrib-napoleon
23 | - sphinx-autodoc-typehints
24 |
25 |
--------------------------------------------------------------------------------
/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_10_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_10_1.png
--------------------------------------------------------------------------------
/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_15_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_15_0.png
--------------------------------------------------------------------------------
/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_17_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_17_0.png
--------------------------------------------------------------------------------
/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_18_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_18_0.png
--------------------------------------------------------------------------------
/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_18_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_18_1.png
--------------------------------------------------------------------------------
/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_18_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_18_2.png
--------------------------------------------------------------------------------
/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_19_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_19_0.png
--------------------------------------------------------------------------------
/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_20_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_20_0.png
--------------------------------------------------------------------------------
/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_21_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_21_0.png
--------------------------------------------------------------------------------
/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_22_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_22_0.png
--------------------------------------------------------------------------------
/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_22_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_22_1.png
--------------------------------------------------------------------------------
/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_22_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_22_2.png
--------------------------------------------------------------------------------
/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_23_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_23_0.png
--------------------------------------------------------------------------------
/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_24_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_24_0.png
--------------------------------------------------------------------------------
/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_24_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_24_1.png
--------------------------------------------------------------------------------
/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_24_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_24_2.png
--------------------------------------------------------------------------------
/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_25_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_25_1.png
--------------------------------------------------------------------------------
/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_26_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_26_1.png
--------------------------------------------------------------------------------
/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_27_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_27_1.png
--------------------------------------------------------------------------------
/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_28_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_28_1.png
--------------------------------------------------------------------------------
/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_29_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_29_1.png
--------------------------------------------------------------------------------
/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_30_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_30_1.png
--------------------------------------------------------------------------------
/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_31_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_31_1.png
--------------------------------------------------------------------------------
/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_4_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_4_0.png
--------------------------------------------------------------------------------
/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_5_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_5_0.png
--------------------------------------------------------------------------------
/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_6_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_6_0.png
--------------------------------------------------------------------------------
/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_8_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_8_0.png
--------------------------------------------------------------------------------
/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_9_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/examples/XAI Tabular Data Example Usage_files/XAI Tabular Data Example Usage_9_0.png
--------------------------------------------------------------------------------
/images/bias.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/images/bias.png
--------------------------------------------------------------------------------
/images/mlops-link.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/images/mlops-link.png
--------------------------------------------------------------------------------
/images/readme-10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/images/readme-10.png
--------------------------------------------------------------------------------
/images/readme-11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/images/readme-11.png
--------------------------------------------------------------------------------
/images/readme-12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/images/readme-12.png
--------------------------------------------------------------------------------
/images/readme-13.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/images/readme-13.png
--------------------------------------------------------------------------------
/images/readme-14.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/images/readme-14.png
--------------------------------------------------------------------------------
/images/readme-15.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/images/readme-15.png
--------------------------------------------------------------------------------
/images/readme-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/images/readme-16.png
--------------------------------------------------------------------------------
/images/readme-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/images/readme-3.png
--------------------------------------------------------------------------------
/images/readme-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/images/readme-4.png
--------------------------------------------------------------------------------
/images/readme-5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/images/readme-5.png
--------------------------------------------------------------------------------
/images/readme-6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/images/readme-6.png
--------------------------------------------------------------------------------
/images/readme-7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/images/readme-7.png
--------------------------------------------------------------------------------
/images/readme-8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/images/readme-8.png
--------------------------------------------------------------------------------
/images/readme-9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/images/readme-9.png
--------------------------------------------------------------------------------
/images/readme-balance-split.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/images/readme-balance-split.jpg
--------------------------------------------------------------------------------
/images/readme-balance-upsample.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/images/readme-balance-upsample.jpg
--------------------------------------------------------------------------------
/images/readme-confusion-matrix.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/images/readme-confusion-matrix.jpg
--------------------------------------------------------------------------------
/images/readme-correlation-dendogram.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/images/readme-correlation-dendogram.jpg
--------------------------------------------------------------------------------
/images/readme-correlation-matrix.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/images/readme-correlation-matrix.jpg
--------------------------------------------------------------------------------
/images/readme-csv-head.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/images/readme-csv-head.jpg
--------------------------------------------------------------------------------
/images/readme-groups.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/images/readme-groups.jpg
--------------------------------------------------------------------------------
/images/readme-imbalance-gender.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/images/readme-imbalance-gender.jpg
--------------------------------------------------------------------------------
/images/readme-imbalance-multiple.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/images/readme-imbalance-multiple.jpg
--------------------------------------------------------------------------------
/images/readme-metrics-column.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/images/readme-metrics-column.jpg
--------------------------------------------------------------------------------
/images/readme-metrics-multiple.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/images/readme-metrics-multiple.jpg
--------------------------------------------------------------------------------
/images/readme-metrics-plot.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/images/readme-metrics-plot.jpg
--------------------------------------------------------------------------------
/images/tech.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/images/tech.jpg
--------------------------------------------------------------------------------
/images/video.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EthicalML/xai/f31a13bc94a91a9163161fed5793556b1eb3ff3c/images/video.jpg
--------------------------------------------------------------------------------
/meta.yaml:
--------------------------------------------------------------------------------
1 | package:
2 | name: xai
3 | version: "0.1.0"
4 |
5 | python:
6 | - 3.6
7 | - 3.7
8 | - 3.8
9 |
10 | build:
11 | number: 1
12 | script: python setup.py install
13 |
14 | about:
15 | home: https://github.com/EthicalML/xai
16 | license: MIT
17 | license_file: LICENSE
18 | summary: XAI - An eXplainability toolbox for machine learning
19 |
20 | extra:
21 | maintainers:
22 | - Alejandro Saucedo
23 |
24 | source:
25 | git_url: https://github.com/EthicalML/xai
26 | git_rev: master
27 |
28 | channels:
29 | - conda-forge
30 | - defaults
31 |
32 | requirements:
33 | build:
34 | - python
35 | - setuptools
36 | - pandas
37 | - matplotlib
38 | - numpy
39 | - scipy
40 | - scikit-learn
41 | - python-dateutil
42 | - pytz
43 | - pyparsing
44 | - cycler
45 | - kiwisolver
46 | - six
47 |
48 | run:
49 | - python
50 | - setuptools
51 | - pandas
52 | - matplotlib
53 | - numpy
54 | - scipy
55 | - scikit-learn
56 | - python-dateutil
57 | - pytz
58 | - pyparsing
59 | - cycler
60 | - kiwisolver
61 | - six
62 |
63 |
--------------------------------------------------------------------------------
/mkdocs.yml:
--------------------------------------------------------------------------------
1 | site_name: XAI - eXplainable AI
2 | site_url: https://github.com/EthicalML/XAI
3 | repo_name: GitHub
4 | site_description: Explainability first machine learning library
5 | copyright: MIT
6 | theme: 'material'
7 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | pandas<1.3.4
2 | matplotlib<3.4.3
3 | numpy<1.21.3
4 | scipy<1.7.1
5 | scikit-learn<1.0.1
6 | python-dateutil
7 | pytz
8 | pyparsing
9 | cycler
10 | kiwisolver
11 | six
12 |
13 |
--------------------------------------------------------------------------------
/setup.py:
--------------------------------------------------------------------------------
1 | from setuptools import setup, Command, find_packages
2 | import os
3 | import sys
4 |
5 | if sys.version_info < (3,0):
6 | sys.exit('\nSorry, Python < 3.0 is not supported\nIf you have Python 3.x installed use: pip3 install xai')
7 | sys.exit('')
8 |
9 | currentFileDirectory = os.path.dirname(__file__)
10 | with open(os.path.join(currentFileDirectory, "README.md"), "r") as f:
11 | readme = f.read()
12 |
13 | # Maintain dependencies of requirements.txt
14 | with open('requirements.txt') as f:
15 | requirements = f.read().splitlines()
16 |
17 | class CleanCommand(Command):
18 | """Custom clean command to tidy up the project root."""
19 | user_options = []
20 | def initialize_options(self):
21 | pass
22 | def finalize_options(self):
23 | pass
24 | def run(self):
25 | os.system('rm -vrf ./build ./dist ./*.pyc ./*.tgz ./*.egg-info ./**/__pycache__ ./__pycache__ ./.eggs ./.cache')
26 |
27 | setup(
28 | name="xai",
29 | version="0.1.0",
30 | description="XAI - An industry-ready machine learning library that ensures explainable AI by design",
31 | long_description=readme,
32 | author="Alejandro Saucedo",
33 | author_email="a@ethical.institute",
34 | url="https://github.com/EthicalML/XAI",
35 | classifiers=[
36 | "Intended Audience :: Developers",
37 | "Natural Language :: English",
38 | 'Programming Language :: Python :: 3.6',
39 | 'Programming Language :: Python :: 3.7',
40 | ],
41 | keywords="xai, machine learning, deep learning, explainability, bias evaluation",
42 | license="MIT",
43 | packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
44 | include_package_data=True,
45 | install_requires=requirements,
46 | data_files=[ (".", ["LICENSE"]) ],
47 | setup_requires=['pytest-runner'],
48 | tests_require=['pytest'],
49 | test_suite='tests',
50 | cmdclass={
51 | 'clean': CleanCommand
52 | }
53 | )
54 |
--------------------------------------------------------------------------------
/xai/data/__init__.py:
--------------------------------------------------------------------------------
1 | import pandas as pd
2 | import numpy as np
3 | import os
4 | from typing import Optional, Tuple
5 |
6 | PATH = os.path.dirname(os.path.abspath(__file__))
7 |
8 | def load_census(return_xy: bool = False
9 | ) -> Tuple[pd.DataFrame, Optional[np.array]]:
10 | """
11 | Load adult census dataset with column as "loan"
12 | instead of "target" to use during examples to "automate
13 | a loan approval process".
14 |
15 | :Example:
16 |
17 | from xai.data import load_census
18 | df = load_census()
19 |
20 | :param return_xy: [default: False] pass True if you would like
21 | to return the data as X, y where X are the input columns and
22 | y is the target. If nothing (or False) is provided, the default
23 | return will be the full dataframe.
24 | :type return_xy: bool
25 | :returns: Dataframe with full contents OR dataframe with inputs and
26 | array with targets.
27 | :rtype: (pandas.DataFrame, Optional[numpy.array])
28 |
29 | """
30 | df = pd.read_csv(os.path.join(PATH, "census.csv"), index_col=0)
31 | if not return_xy:
32 | return df
33 |
34 | x = df.drop("loan", axis=1)
35 | y = df["loan"]
36 | return x, y
37 |
38 |
--------------------------------------------------------------------------------