Skip to content

Commit

Permalink
Implement automatic eigenvalue selection
Browse files Browse the repository at this point in the history
  • Loading branch information
ycanerol committed May 19, 2017
1 parent ab06df9 commit 6db882f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion LNP_model
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ from datetime import datetime

execution_timer = datetime.now()

total_frames = 4000000
total_frames = 10000000
dt = 0.01 # Time step
t = np.arange(0, total_frames*dt, dt) # Time vector
filter_time = .6 # The longest feature RGCs respond to is ~600ms
Expand Down
2 changes: 1 addition & 1 deletion plotLNP.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

rows = 2
columns = 1
fig = plt.figure(figsize=(8, 8.5))
fig = plt.figure(figsize=(8, 10))

plt.subplot(rows, columns, 1)
plt.plot(filter_kernel1, alpha=.4)
Expand Down
5 changes: 3 additions & 2 deletions stc.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ def stc(spikes, stimulus, filter_length, sta_temp):
plt.xlabel('Eigenvalue index')
plt.ylabel('Variance')

eigen_indices = [0, 1]
interesting_eigen_indices=np.where(np.abs(w-1)>.05)[0]
eigen_indices = [0, -1]
eigen_legends = []

plt.subplot(1, 2, 2)
for i in eigen_indices:
for i in interesting_eigen_indices:
plt.plot(v[:, i])
eigen_legends.append(str('Eigenvector '+str(i)))
plt.plot(recovered_kernel,':')
Expand Down

0 comments on commit 6db882f

Please sign in to comment.