Repository navigation
Corr comp - #159
Merged
Merged
Corr comp#159
Conversation
mihaic
requested changes
Jan 13, 2017
| Correlate the rows of set1 with the rows of set2. | ||
| If set1 == set2, it is auto-correlation computation | ||
| resulting in a symmetric correlation matrix. | ||
| The number of columns MUST agree between set1 and set2 |
Member
There was a problem hiding this comment.
Could you please add a reference for the method of correlation computation you are using? Some Latex code could help too.
| return data | ||
|
|
||
|
|
||
| def compute_correlation(set1, set2): |
Member
There was a problem hiding this comment.
Shouldn't the parameters be called array1/2 or matrix1/2?
Member
Author
There was a problem hiding this comment.
they are essentially two matrices, depicting two sets of variables. I can use matrix1/2
mihaic
requested changes
Jan 13, 2017
| is the standard deviation of variable X | ||
|
|
||
| Reducing the correlation computation to matrix multiplication | ||
| and use BLAS GEMM API wrapped by Scipy can speedup the numpy build-in |
mihaic
reviewed
Jan 13, 2017
| import math | ||
|
|
||
|
|
||
| def normalize_for_correlation(data, axis): |
Member
There was a problem hiding this comment.
Is it necessary for this function to be public?
Member
Author
There was a problem hiding this comment.
May or may not be used by others in the future. But for now, let me make it private
mihaic
approved these changes
Jan 13, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a high-performance correlation computation function using BLAS wrapped in Cython to
brainiak/fcma/util. Running at least one order of magnitude faster thannp.corrcoef.