Skip to content

Commit

Permalink
updating imports for pip install
Browse files Browse the repository at this point in the history
  • Loading branch information
pgupta29 committed Aug 8, 2023
1 parent 97127e7 commit 9b7f77c
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 34 deletions.
4 changes: 2 additions & 2 deletions demos/ieeg_seizure.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import scipy.io as sio

import mdp # for incremental sfa, ica, pca
from proSVD.proSVD import proSVD
from proSVD.utils import get_derivs
from proSVD import proSVD
from pro_utils import get_derivs

# %% data from http://ieeg-swez.ethz.ch/
# sampled at 512 hz, each file is 3 mins before seizure, seizure, 3 mins after
Expand Down
4 changes: 2 additions & 2 deletions demos/pandarinath2018_reaching.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import scipy.io as sio
from scipy.ndimage import gaussian_filter1d

from proSVD.proSVD import proSVD
from proSVD.utils import get_streamingSVD, get_derivs
from proSVD import proSVD
from pro_utils import get_streamingSVD, get_derivs

import os

Expand Down
5 changes: 2 additions & 3 deletions demos/rp_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
from scipy.stats import sem
from scipy.spatial.distance import pdist

from proSVD.proSVD import proSVD
from proSVD.utils import embed_data, generate_stable_LDS, get_stable_dynamics_mat
from proSVD import proSVD
from pro_utils import embed_data, generate_stable_LDS, get_stable_dynamics_mat

np.set_printoptions(precision=4)
#%% reduction functions
Expand Down Expand Up @@ -219,7 +219,6 @@ def get_accuracy_6_dim(X, dists, rp_range, k=6, form='traut', iters=20):
plt.plot(X_low.T)

#%% running distortion
%%time
iters = 2 # iters for RP
# rp_range = np.array([10, 50, 100, 500, 1000, 5000])
# rp_range = np.ceil(np.logspace(1, 4, 30)).astype('int')
Expand Down
6 changes: 2 additions & 4 deletions demos/stringer2019_ephys.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from scipy.ndimage import gaussian_filter1d
from sklearn import random_projection as rp

from proSVD.proSVD import proSVD
from proSVD import proSVD

#%% loading processed matlab data
# one mouse
Expand Down Expand Up @@ -68,9 +68,7 @@ def reduce_sparseRP(X, comps=100, eps=0.1, transformer=None):


#%% running proSVD
%%time

k = 10
k = 10
l1 = k # cols to init
l = 1 # num cols processed per iter (1 datapoint)
decay = 1 # 'forgetting'
Expand Down
2 changes: 1 addition & 1 deletion demos/toy_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from scipy.ndimage import gaussian_filter1d

from proSVD import proSVD
# from proSVD.utils import get_streamingSVD
from pro_utils import get_streamingSVD

#%% switching between different spectral regimes
np.random.seed(100)
Expand Down
File renamed without changes.
31 changes: 31 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "proSVD"
version = "0.0.1"
description = "Code for streaming dimension reduction with stability"
authors = [{name = "Pranjal Gupta"}]

readme = "README.md"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]

requires-python = ">=3.7"
keywords = ["streaming", "SVD"]
dependencies = [
"numpy",
"scipy",
"matplotlib",
"scikit-learn"
]

[tool.setuptools]
py-modules = ["proSVD", "pro_utils"]

[project.optional-dependencies]
related-methods = ["pymdptoolbox"]
5 changes: 0 additions & 5 deletions requirements.txt

This file was deleted.

17 changes: 0 additions & 17 deletions setup.py

This file was deleted.

0 comments on commit 9b7f77c

Please sign in to comment.