Skip to content

Commit

Permalink
Clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
ikeuchi-screen committed Feb 16, 2024
1 parent eb27323 commit be54b9d
Show file tree
Hide file tree
Showing 12 changed files with 173 additions and 227 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
# stop the build if there are Python syntax errors or undefined names
flake8 lingam --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 lingam --count --exit-zero --ignore=E203,E741, --max-complexity=10 --max-line-length=127 --statistics
flake8 lingam --count --exit-zero --ignore=E203,E741,C901 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest -v --cov=lingam --cov-report=term-missing
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ In addition, we add the following guidelines:
Coding style is checked with flake8.

``` sh
flake8 lingam --count --ignore=E203,E741 --max-complexity=10 --max-line-length=127 --statistics
flake8 lingam --count --ignore=E203,E741,C901 --max-line-length=127 --statistics
```

## Documentation
Expand Down
6 changes: 4 additions & 2 deletions lingam/bottom_up_parce_lingam.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ def __init__(
* ``1`` : :math:`x_i` has a directed path to :math:`x_j`
* ``-1`` : No prior knowledge is available to know if either of the two cases above (0 or 1) is true.
independence : {'hsic', 'fcorr'}, optional (default='hsic')
Methods to determine independence. If 'hsic' is set, test for independence by HSIC. If 'fcorr' is set, independence is determined by F-correlation.
Methods to determine independence. If 'hsic' is set, test for independence by HSIC.
If 'fcorr' is set, independence is determined by F-correlation.
ind_corr : float, optional (default=0.5)
The threshold value for determining independence by F-correlation; independence is determined when the value of F-correlation is below this threshold value.
The threshold value for determining independence by F-correlation;
independence is determined when the value of F-correlation is below this threshold value.
"""
# Check parameters
if regressor is not None:
Expand Down
6 changes: 4 additions & 2 deletions lingam/camuv.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@ def __init__(
num_explanatory_vals : int, optional (default=2)
Maximum number of explanatory variables.
independence : {'hsic', 'fcorr'}, optional (default='hsic')
Methods to determine independence. If 'hsic' is set, test for independence by HSIC. If 'fcorr' is set, independence is determined by F-correlation.
Methods to determine independence. If 'hsic' is set, test for independence by HSIC.
If 'fcorr' is set, independence is determined by F-correlation.
ind_corr : float, optional (default=0.5)
The threshold value for determining independence by F-correlation; independence is determined when the value of F-correlation is below this threshold value.
The threshold value for determining independence by F-correlation;
independence is determined when the value of F-correlation is below this threshold value.
"""

# Check parameters
Expand Down
Loading

0 comments on commit be54b9d

Please sign in to comment.