Corr comp #159
Merged
Corr comp #159
Conversation
brainiak/fcma/util.py
Outdated
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 |
mihaic
Jan 13, 2017
Contributor
Could you please add a reference for the method of correlation computation you are using? Some Latex code could help too.
Could you please add a reference for the method of correlation computation you are using? Some Latex code could help too.
yidawang
Jan 13, 2017
Author
Member
done
done
brainiak/fcma/util.py
Outdated
return data | ||
|
||
|
||
def compute_correlation(set1, set2): |
mihaic
Jan 13, 2017
Contributor
Shouldn't the parameters be called array1/2
or matrix1/2
?
Shouldn't the parameters be called array1/2
or matrix1/2
?
yidawang
Jan 13, 2017
Author
Member
they are essentially two matrices, depicting two sets of variables. I can use matrix1/2
they are essentially two matrices, depicting two sets of variables. I can use matrix1/2
brainiak/fcma/util.py
Outdated
@@ -70,6 +70,19 @@ def compute_correlation(matrix1, matrix2): | |||
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
Jan 13, 2017
Contributor
use->using, build-in->built-in
use->using, build-in->built-in
yidawang
Jan 13, 2017
Author
Member
done
done
brainiak/fcma/util.py
Outdated
import math | ||
|
||
|
||
def normalize_for_correlation(data, axis): |
mihaic
Jan 13, 2017
Contributor
Is it necessary for this function to be public?
Is it necessary for this function to be public?
yidawang
Jan 13, 2017
Author
Member
May or may not be used by others in the future. But for now, let me make it private
May or may not be used by others in the future. But for now, let me make it private
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.
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
.