{
"info": {
"author": "Andr\u00e9 Artelt",
"author_email": "aartelt@techfak.uni-bielefeld.de",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.6",
"Topic :: Scientific/Engineering :: Artificial Intelligence"
],
"description": "****\nceml\n****\n--------------------------------------------------------\nCounterfactuals for Explaining Machine Learning models\n--------------------------------------------------------\n\nceml is a Python toolbox for computing counterfactuals. Counterfactuals can be use to explain the predictions of machine learing models.\n\nIt supports many common machine learning frameworks:\n\n - scikit-learn\n - PyTorch\n - Keras\n - Tensorflow\n\nFurthermore, ceml is easy to use and can be extended very easily. See the following user guide for more information on how to use and extend ceml.\n\nInstallation\n------------\n\n**Note: Python 3.6 or higher is required!**\n\nPyPi\n++++\n\n.. code-block:: bash\n\n pip install ceml\n\n**Note**: The package hosted on PyPi uses the cpu only. If you want to use the gpu, you have to install ceml manually - see next section.\n\nGit\n+++\nDownload or clone the repository:\n\n.. code:: bash\n\n git clone https://github.com/andreArtelt/ceml.git\n cd ceml\n\nInstall all requirements (listed in ``requirements.txt``):\n\n.. code:: bash\n\n pip install -r requirements.txt\n\n**Note**: If you want to use a gpu/tpu, you have to install the gpu version of jax, tensorflow and pytorch manually. Do not use ``pip install -r requirements.txt``.\n\nInstall the toolbox itself:\n\n.. code:: bash\n\n pip install\n\n\nQuick example\n-------------\n\n.. code-block:: python\n\n #!/usr/bin/env python3\n # -*- coding: utf-8 -*-\n from sklearn.datasets import load_iris\n from sklearn.model_selection import train_test_split\n from sklearn.metrics import accuracy_score\n from sklearn.tree import DecisionTreeClassifier\n\n from ceml.sklearn import generate_counterfactual\n\n\n if __name__ == \"__main__\":\n # Load data\n X, y = load_iris(True)\n X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.33, random_state=4242)\n\n # Whitelist of features - list of features we can change/use when computing a counterfactual \n features_whitelist = None # We can use all features\n\n # Create and fit model\n model = DecisionTreeClassifier(max_depth=3)\n model.fit(X_train, y_train)\n\n # Select data point for explaining its prediction\n x = X_test[1,:]\n print(\"Prediction on x: {0}\".format(model.predict([x])))\n\n # Compute counterfactual\n print(\"\\nCompute counterfactual ....\")\n print(generate_counterfactual(model, x, y_target=0, features_whitelist=features_whitelist))\n\nDocumentation\n-------------\n\nDocumentation is available on readthedocs:`https://ceml.readthedocs.io/en/latest/ `_\n\nLicense\n-------\n\nMIT license - See `LICENSE.md `_\n\nHow to cite?\n------------\n You can cite ceml by using the following BibTeX entry:\n\n .. code-block::\n\n @misc{ceml,\n author = {Andr\u00e9 Artelt},\n title = {CEML: Counterfactuals for Explaining Machine Learning models - A Python toolbox},\n year = {2019},\n publisher = {GitHub},\n journal = {GitHub repository},\n howpublished = {\\url{https://www.github.com/andreArtelt/ceml}}\n }\n\n\nThird party components\n----------------------\n\n - `numpy `_\n - `scipy `_\n - `jax `_\n - `scikit-learn `_\n - `sklearn-lvq `_\n - `PyTorch `_\n - `tensorflow `_\n\n\n",
"description_content_type": "",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/andreArtelt/ceml",
"keywords": "machine learning counterfactual",
"license": "MIT",
"maintainer": "",
"maintainer_email": "",
"name": "ceml",
"package_url": "https://pypi.org/project/ceml/",
"platform": "",
"project_url": "https://pypi.org/project/ceml/",
"project_urls": {
"Homepage": "https://github.com/andreArtelt/ceml"
},
"release_url": "https://pypi.org/project/ceml/0.2/",
"requires_dist": [
"jax (==0.1.39)",
"jaxlib (==0.1.21)",
"numpy (==1.16.4)",
"scikit-learn (==0.21.2)",
"scipy (==1.3.0)",
"sklearn-lvq (==1.1.0)",
"tensorflow (==1.14.0)",
"torch (==1.1.0)"
],
"requires_python": "",
"summary": "Counterfactuals for explaining machine learning models - A Python toolbox",
"version": "0.2"
},
"last_serial": 5620027,
"releases": {
"0.1": [
{
"comment_text": "",
"digests": {
"md5": "3188623a08aeb2555f3126b49914e053",
"sha256": "788ab836c94c703c97a853a33c437157e0f7c1532f5c91bbb3bb6dbb3dca8976"
},
"downloads": -1,
"filename": "ceml-0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3188623a08aeb2555f3126b49914e053",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 60487,
"upload_time": "2019-07-11T14:30:38",
"url": "https://files.pythonhosted.org/packages/20/a8/b87164f7c958458a31e1e974b5a2da12eccc9f0dda8e5ebcaed364668598/ceml-0.1-py3-none-any.whl"
}
],
"0.2": [
{
"comment_text": "",
"digests": {
"md5": "28b5575ee2828ce7ba8fdc5611e92dfe",
"sha256": "07b1e713d68303faa176bb812336fdfc49c9c1c02c7bf23cb803af0f657d9904"
},
"downloads": -1,
"filename": "ceml-0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "28b5575ee2828ce7ba8fdc5611e92dfe",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 67504,
"upload_time": "2019-08-01T18:12:31",
"url": "https://files.pythonhosted.org/packages/bc/38/c95fd0911df6461ea56cf1c4c6676eda3de5d60e9269ab08823adc7c6787/ceml-0.2-py3-none-any.whl"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "28b5575ee2828ce7ba8fdc5611e92dfe",
"sha256": "07b1e713d68303faa176bb812336fdfc49c9c1c02c7bf23cb803af0f657d9904"
},
"downloads": -1,
"filename": "ceml-0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "28b5575ee2828ce7ba8fdc5611e92dfe",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 67504,
"upload_time": "2019-08-01T18:12:31",
"url": "https://files.pythonhosted.org/packages/bc/38/c95fd0911df6461ea56cf1c4c6676eda3de5d60e9269ab08823adc7c6787/ceml-0.2-py3-none-any.whl"
}
]
}