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

Fixed a number of issues since initial code release. #5

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
4484301
Removing old Google and TF1 code.
MalcolmSlaney Feb 24, 2024
96caaff
Removing bazel temp directories
MalcolmSlaney Feb 24, 2024
f04f1ac
Removing bazel work files
MalcolmSlaney Feb 24, 2024
f550768
Adding .gitignore (for bazel and other temp files)
MalcolmSlaney Feb 24, 2024
4269809
Minor cleanup of cleanups.
MalcolmSlaney Feb 24, 2024
6597e99
More cleanups.
MalcolmSlaney Feb 24, 2024
fcdb48d
Remove matplotlib.use since it doesn't seen necessary any more.
MalcolmSlaney Feb 26, 2024
aa358bf
Adding assertions to make sure LDA data is good.
MalcolmSlaney Mar 18, 2024
283b413
More checks for finite results
MalcolmSlaney Mar 18, 2024
d6d152f
Make sure CCA results are finite
MalcolmSlaney Mar 19, 2024
d2db489
Mitigate possible roundoff error.
MalcolmSlaney Mar 19, 2024
10057c7
Fix LDA roundoff errror. Fix Bazel test error.
MalcolmSlaney Mar 21, 2024
1a361fd
Various fixes to all test run under MacOSX.
MalcolmSlaney Mar 22, 2024
a36d66f
Add Bazel Test message.
MalcolmSlaney Mar 22, 2024
abcf499
Addjng information about fork from Google.
MalcolmSlaney Mar 22, 2024
dc55c64
Additional assertions, looking for bad (zero) data
MalcolmSlaney Mar 22, 2024
484c24a
Error checking message
MalcolmSlaney Mar 22, 2024
3fd1e43
Several fixes for latest demo data.
MalcolmSlaney Mar 26, 2024
ae7722b
Adding first bits of code for realtime LSL interface.
MalcolmSlaney Jun 17, 2024
8b28701
Make correlation power normalization more robust.
MalcolmSlaney Jun 17, 2024
64b95fb
More local files to ignore and not push to master repository
MalcolmSlaney Jun 17, 2024
319132f
Added code to read from the streams. Many bug fixes.
MalcolmSlaney Jun 18, 2024
9924609
Adding some comments so I know how this old code works.
MalcolmSlaney Jun 25, 2024
f35ca13
Adding comments about the data buffer.
MalcolmSlaney Jun 25, 2024
dfb5078
Adding decimation to the pipeline, before adding context.
MalcolmSlaney Jun 26, 2024
6ea1bec
Fixing channel number parsing. Adding test for string parsing, end to…
MalcolmSlaney Jun 27, 2024
764bcbf
Cleaning up comments when testing from a string parameter.
MalcolmSlaney Jun 27, 2024
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
Prev Previous commit
Next Next commit
Make sure CCA results are finite
  • Loading branch information
MalcolmSlaney committed Mar 19, 2024
commit d6d152f5a6c725c54329d439c6332a5f65151b74
11 changes: 11 additions & 0 deletions telluride_decoding/cca.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,11 @@ def calculate_cca_parameters_from_dataset(dataset, dim, regularization=0.1,
num_mini_batches += 1
if mini_batch_count and num_mini_batches >= mini_batch_count:
break
assert np.sum(~np.isfinite(cov_xx)) == 0
assert np.sum(~np.isfinite(cov_yy)) == 0
assert np.sum(~np.isfinite(cov_xy)) == 0
assert np.sum(~np.isfinite(sum_x)) == 0
assert np.sum(~np.isfinite(sum_y)) == 0
logging.info('Calculating the CCA parameters from %d minibatches',
num_mini_batches)
if not num_mini_batches:
Expand Down Expand Up @@ -365,6 +370,12 @@ def calculate_cca_parameters_from_dataset(dataset, dim, regularization=0.1,
rot_y = np.matmul(k22, v[:, 0:dim])
e = e[0:dim]

assert np.sum(~np.isfinite(rot_x)) == 0
assert np.sum(~np.isfinite(rot_y)) == 0
assert np.sum(~np.isfinite(mean_x)) == 0
assert np.sum(~np.isfinite(mean_y)) == 0
assert np.sum(~np.isfinite(e)) == 0

return rot_x, rot_y, mean_x, mean_y, e


Expand Down