argueview-ArgueView是爲機器學習預測生成基於文本的演示文稿的工具,以及基於特徵重要性的解釋工具。該工具利用圖爾明的論證模型構建基於文本的解釋。-Sophia Hadash
發佈:2020-12-22 17:31:32.174502
做者:Sophia Hadash
### 做者郵箱:s.hadash@tue.nl ### 首頁:https://github.com/SophiaHadash/ArgueView ### 文檔:None ### 下載連接
ArgueView is a tool for generating text-based presentations for machine-learning predictions and feature-importance based explanation tools. The tool makes use of Toulmin's model of argumentation for structuring the text-based explanations.python
Example output using the visualizer:git
The procedure for creating ArgueView explanations is as follows: 1. A traditional machine-learning context is created (i.e. data, model) 2. An explainer is employed to produce feature importance. This can be a white-box or black-box explainer. An example of a black-box explainer is LIME. 3. The machine-learning context and the feature importance are given to ArgueView such that it can produce a textual explanation.github
Installation
ArgueView is available as a python package on PyPi. You can install it using pip
:docker
pip install argueview
Or, using pipenv
:機器學習
pipenv install argueview
Usage
Usage is documented in our examples. Examples are available in python and jupyter notebooks. The following examples are available:工具
- minimal, hypothetical data and explainer: python
- creditg data with LIME explainer: python, notebook
- creditg data with shap explainer: python, notebook
Running the examples
There are two examples available to help you learn how to use ArgueView. The 'plain' examples uses hypothetical data to show a minimalistic use-case. The CreditG example uses real data and a real ML model to illustrate a real-world use case.學習
If you would like to run the CreditG example the script needs to obtain the data. For this we use OpenML. However, usage requires a valid API key and you will need to obtain one to run the example.ui
After you have obtained your key, create a .env
file with your OpenML API key. this
echo "OML_APIKEY={my-key}" > .env
Note: You can skip this step if you want to run the hypothetical example.url
Install all dependencies:
pipenv install --dev
Run an example:
/path/to/python3 ./examples/{example}/example.py
Additionally, there is are Jupyther Notebooks available to directly see how ArgueView works.
Building
Follow these steps to build ArgueView from source.
- make sure you install the dependencies. ArgueView requires the following dependencies:
python>=3.5
,pip3
,pipenv
,git
. - build using make
make
Using Docker
Alternatively you can build ArgueView using docker.
- build context dockerfile
docker build -t argueview/context:local .
- run
build.sh
in a containerCID=$(docker run -v /var/run/docker.sock:/var/run/docker.sock argueview/context build.sh)
copy results from the container
docker cp ${CID}:/argueview/argueview.egg-info ./argueview.egg-info docker cp ${CID}:/argueview/build ./build docker cp ${CID}:/argueview/dist ./dist
Copy from pypi.org
查詢時間:15.165ms
渲染時間:15.299ms
本文同步分享在 博客「zhenruyan」(other)。
若有侵權,請聯繫 support@oschina.cn 刪除。
本文參與「OSC源創計劃」,歡迎正在閱讀的你也加入,一塊兒分享。