Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dca_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9"]
python-version: ["3.8", "3.9", "3.10"]
steps:
- name: Test DCA
uses: actions/checkout@v4
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ If you are installing with `pip` you can run
$ pip install -e . -r requirements.txt
```

Note: DCA only requires a CPU-only `pytorch`. If you wish to, **before** installing DCA as in the above instructions,
you can install a CPU-only `pytorch` by following the `pytorch` [installation guide](https://pytorch.org/get-started/locally/).


```bash
$ pip install torch --index-url https://download.pytorch.org/whl/cpu
```


## Datasets
The 4 datasets used in the DCA paper can be found in the following locations
* [M1](https://zenodo.org/record/583331) - We used indy_20160627_01.mat
Expand Down
2 changes: 0 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#
import os
import sys
import sphinx_rtd_theme

# Get the project root dir, which is the parent parent dir of this
project_root = os.path.dirname(os.path.dirname(os.getcwd()))
Expand Down Expand Up @@ -68,7 +67,6 @@
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand Down
32 changes: 31 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
[build-system]
requires = ["setuptools>=42"]
requires = ["setuptools>=61", "wheel"] # [CHANGE] upgraded setuptools to 61+ for full pyproject.toml metadata support
build-backend = "setuptools.build_meta"

[project]
name = "DynamicalComponentsAnalysis"
version = "1.1.0"
description = "Dynamical Components Analysis"
readme = "README.md"
requires-python = ">=3.6"
authors = [
{ name="Jesse Livezey", email="jesse.livezey@gmail.com" },
{ name="David Clark" }
]
license = { file = "LICENSE.txt" }
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent"
]
dynamic = ["dependencies"]

[project.urls]
Homepage = "https://github.com/BouchardLab/DynamicalComponentsAnalysis"
"Bug Tracker" = "https://github.com/BouchardLab/DynamicalComponentsAnalysis/issues"

[tool.setuptools.packages.find]
where = ["src"]

[tool.setuptools]
package-dir = {"" = "src"}

[tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]}
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ h5py
pandas
scikit-learn
matplotlib
--extra-index-url https://download.pytorch.org/whl/cpu
torch
24 changes: 0 additions & 24 deletions setup.cfg

This file was deleted.

4 changes: 0 additions & 4 deletions setup.py

This file was deleted.

4 changes: 2 additions & 2 deletions src/dca/cov_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -812,8 +812,8 @@ def __get__(self, obj, objtype):

@memoized
def pv_permutation(T, N):
A = np.arange((T * N)**2, dtype=np.int).reshape((T * N, T * N))
A_perm = np.zeros((T**2, N**2), dtype=np.int)
A = np.arange((T * N)**2, dtype=int).reshape((T * N, T * N))
A_perm = np.zeros((T**2, N**2), dtype=int)
for i in range(T):
for j in range(T):
row_idx = i * T + j
Expand Down