Skip to content

Commit

Permalink
Enrich README (#9)
Browse files Browse the repository at this point in the history
* modify README.rst

* modify README.rst

* modify README.rst

* Create python-package-conda.yml

* modify README.rst

* add pr template
  • Loading branch information
kyosek authored Jul 15, 2023
1 parent c5d3b26 commit 9c49ec3
Show file tree
Hide file tree
Showing 7 changed files with 125 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Bug Report 🐞
about: Something isn't working as expected? Here is the right place to report.
---

## Description
<!-- A clear description of the bug -->

## Reproducible example
<!-- Minimal code that exhibits this behavior -->

## Environment info

LightGBM version or commit hash:

Command(s) you used to install LightGBM

```shell

```

<!-- Put any additional environment information here -->


## Additional Comments
<!-- What else should we know? -->
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Feature Request 💡
about: Suggest a new idea for the project.
labels: enhancement, feature-request
---

<!--
Please search your feature on previous issues and our feature requests consolidation hub (https://github.com/microsoft/LightGBM/issues/2302) before you open a new one.
-->

## Summary

<!-- Briefly explain your feature proposal. -->

## Motivation

<!-- Why is it useful to have this feature in the LightGBM project? -->

## Description

<!-- Detailed description of the new feature. -->

## References

<!-- Any useful references, for instance, papers, implementations in other projects, draft code snippets, etc. -->
18 changes: 18 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!--
Thanks for contributing a pull request! Please ensure that
your PR satisfies the checklist before submitting:
- [ ] Added **tests** for changed code.
- [ ] Updated **documentation** for changed code.
Again, thanks for contributing!
-->

#### Reference issue
<!--Example: Closes gh-WXYZ.-->

#### What does this implement/fix?
<!--Please explain your changes.-->

#### Additional information
<!--Any additional information you think is important.-->
File renamed without changes.
38 changes: 38 additions & 0 deletions .github/workflows/python-package-conda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Python Package using Conda

on: [push]

jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 5

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
conda env update --file environment.yml --name base
- name: Lint with flake8
run: |
conda install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Black formatting
run: |
conda install black
black .
- name: Test with pytest
run: |
conda install pytest
pytest
19 changes: 18 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ FOCUS: Flexible Optimizable Counterfactual Explanations for Tree Ensembles
:target: https://coveralls.io/github/kyosek/focus-cfe
:alt: Coverage Status

.. image:: https://api.codeclimate.com/v1/badges/bdc3d8d0454274c753c4/maintainability
.. image:: https://api.codeclimate.com/v1/badges/93840d29606abb212051/maintainability
:target: https://codeclimate.com/github/kyosek/focus-cfe/maintainability
:alt: Maintainability

Expand All @@ -31,6 +31,23 @@ FOCUS generates optimal distance counterfactual explanations to the original dat
# Generate counterfactual explanations for given tree model and features
pertubed = focus.generate(tree_model, X)
**Examples**\:

- More comprehensive example can be found in the `examples folder <https://github.com/kyosek/focus/blob/master/examples/focus_example.py>`_.
- Another example in a kaggle notebook can be found `here <https://www.kaggle.com/code/kyosukemorita/focus-cfe-example>`_.
- Below demonstrates the comparison of before and after FOCUS was applied to feature set from the above example.

.. image:: docs/plot.png
:width: 200px
:height: 100px
:scale: 50 %
:alt: Before and After FOCUS was applied to the features from above example.

**Note**\:

Currently FOCUS can be applied to scikit-learn `DecisionTreeClassifier`, `RandomForestClassifier` and `AdaBoostClassifier`.

Installation
^^^^^^^^^^^^

Expand Down
Binary file added docs/plot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9c49ec3

Please sign in to comment.