Skip to content

Commit

Permalink
Release: Version 0.0.1
Browse files Browse the repository at this point in the history
Release for the Version 1.0.0 of the gam library
  • Loading branch information
rreilly10 committed Nov 13, 2020
1 parent afbde7b commit 86506c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 25 deletions.
27 changes: 3 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ This implementation is based on "[Global Explanations for Neural Networks](https

## Installation
```sh
python3 -m pip install git+https://github.com/capitalone/global-attribution-mapping.git
python3 -m pip install gam
```
## Get Started
First generate local attributions using your favorite technique, then:

```Python
>>> from gam.gam import GAM
>>> # for a quick example use `attributions_path="tests/test_attributes.csv"`
>>> # Input/Output: csv (columns: features, rows: local/global attribution)
>>> gam = GAM(attributions_path="<path_to_your_attributes>.csv", distance="spearman", k=2)
>>> gam.generate()
>>> gam.explanations
Expand All @@ -32,34 +33,12 @@ First generate local attributions using your favorite technique, then:
# bar chart of feature importance with subpopulation size
```

# Acknowledgements
Thank you to Paul Zeng for his contribution to the implementation and valuable feedback.

# Development
* `Python 3.7`, `Pytest`, `requirements.txt` for dependencies
* Branching: master is protected (need one other reviewer to merge)
* Input/Output: csv (columns: features, rows: local/global attribution)
* Underlying data structures: `numpy arrays`

### Tests
To run tests:
```bash
$ python -m pytest tests/
```

### MVP
* assume local attributions are given
* K is a specified parameter
* accompany csv output with a simple visualization showing top 5 clusters and their top 5 features
* accelerated distance calc using merge sort (from O(n^2) to O(nlogn))

### Post-MVP
* optimize k based on silouhette score
* generate local attributions (using appropriate local method)




## Contributors

We welcome Your interest in Capital One’s Open Source Projects (the
Expand All @@ -79,4 +58,4 @@ impact Your rights to use Your own Contributions for any other purpose.

This project adheres to the [Open Code of Conduct](https://developer.capitalone.com/resources/code-of-conduct)
By participating, you are
expected to honor this code.
expected to honor this code.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-Copyright: Copyright (c) Capital One Services, LLC
# SPDX-License-Identifier: Apache-2.0
# Copyright 2018 Capital One Services, LLC
# Copyright 2020 Capital One Services, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down

0 comments on commit 86506c9

Please sign in to comment.