Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reparametrize raisedcosine #50

Merged
merged 36 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
1f1e95b
added tests
BalzaniEdoardo Oct 13, 2023
ccb1c5e
linted
BalzaniEdoardo Oct 14, 2023
6bd116a
run on mac
BalzaniEdoardo Oct 14, 2023
5e4122a
test on linux and mac
BalzaniEdoardo Oct 14, 2023
df69255
clip -1
BalzaniEdoardo Nov 21, 2023
47cfaee
changed default
BalzaniEdoardo Nov 21, 2023
f13661d
merged
BalzaniEdoardo Nov 30, 2023
56c51db
reparametrization
BalzaniEdoardo Nov 30, 2023
f2b270e
linted
BalzaniEdoardo Nov 30, 2023
8c9b152
updated param names
BalzaniEdoardo Nov 30, 2023
b23eebd
updated default
BalzaniEdoardo Nov 30, 2023
9936ca3
improved parametrization
BalzaniEdoardo Nov 30, 2023
16bd684
removed unused variable
BalzaniEdoardo Dec 7, 2023
29cd30b
meged conflicts in basis?
BalzaniEdoardo Dec 15, 2023
b9bc61b
added checks
BalzaniEdoardo Dec 15, 2023
e8f318c
linted
BalzaniEdoardo Dec 15, 2023
b4b2e2c
fixed tests
BalzaniEdoardo Dec 15, 2023
ff32160
fixed refs
BalzaniEdoardo Dec 15, 2023
06757d9
fixed note
BalzaniEdoardo Dec 15, 2023
664169d
improved docstring
BalzaniEdoardo Dec 15, 2023
4d58d32
reversed ci change to only ubuntu
BalzaniEdoardo Dec 19, 2023
1fcd446
Update src/nemos/basis.py
BalzaniEdoardo Dec 19, 2023
fd3d1d4
Update src/nemos/basis.py
BalzaniEdoardo Dec 19, 2023
93a1b1e
Update src/nemos/basis.py
BalzaniEdoardo Dec 19, 2023
de1a895
made width a read only property, added comment on evaluate
BalzaniEdoardo Dec 19, 2023
cf4a60d
getter only for time scaling
BalzaniEdoardo Dec 19, 2023
120afe1
Update src/nemos/basis.py
BalzaniEdoardo Dec 19, 2023
b86760e
Update tests/test_basis.py
BalzaniEdoardo Dec 19, 2023
29d116d
Merge branch 'reparametrize_raisedcosine' of github.com:flatironinsti…
BalzaniEdoardo Dec 19, 2023
50fec49
linted
BalzaniEdoardo Dec 19, 2023
5a1a350
modified enforcing basis to zero
BalzaniEdoardo Dec 19, 2023
753ed20
improved code linting
BalzaniEdoardo Dec 19, 2023
348f8af
linted
BalzaniEdoardo Dec 19, 2023
e168cc4
changed code to have the very last time point being 0
BalzaniEdoardo Dec 19, 2023
5785acc
added comment
BalzaniEdoardo Dec 19, 2023
14055b6
linted
BalzaniEdoardo Dec 19, 2023
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/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
tox:
strategy:
matrix:
os: [ubuntu-latest] #[ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-latest] #[ubuntu-latest, macos-latest, windows-latest]
billbrod marked this conversation as resolved.
Show resolved Hide resolved
python-version: ['3.10'] #['3.8', '3.9', '3.10']
runs-on: ${{ matrix.os }}
steps:
Expand Down
4 changes: 1 addition & 3 deletions docs/developers_notes/01-basis_module.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ Abstract Class Basis
│ │
│ └─ Concrete Subclass CyclicBSplineBasis
├─ Abstract Subclass RaisedCosineBasis
│ │
│ ├─ Concrete Subclass RaisedCosineBasisLinear
├─ Concrete Subclass RaisedCosineBasisLinear
│ │
│ └─ Concrete Subclass RaisedCosineBasisLog
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/plot_1D_basis_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@
# evaluate a log-spaced cosine raised function basis.

# Instantiate the basis noting that the `RaisedCosineBasisLog` does not require an `order` parameter
raised_cosine_log = nmo.basis.RaisedCosineBasisLog(n_basis_funcs=10)
raised_cosine_log = nmo.basis.RaisedCosineBasisLog(n_basis_funcs=10, width=1.5, time_scaling=50)

# Evaluate the raised cosine basis at the equi-spaced sample points
# (same method in all Basis elements)
samples, eval_basis = raised_cosine_log.evaluate_on_grid(1000)
samples, eval_basis = raised_cosine_log.evaluate_on_grid(100)

# Plot the evaluated log-spaced raised cosine basis
plt.figure()
Expand Down
10 changes: 1 addition & 9 deletions src/nemos/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
#!/usr/bin/env python3

from . import (
basis,
exceptions,
glm,
observation_models,
regularizer,
simulation,
utils,
)
from . import basis, exceptions, glm, observation_models, regularizer, simulation, utils
Loading