Skip to content

Conversation

@snastase
Copy link
Contributor

@snastase snastase commented Jan 10, 2019

I've added a return_nans option to brainiak.fcma.util.compute_correlation. Original behavior was to return float 0.0 correlation for any vectors containing NaNs. Now, if return_nans=False (the default) we the original behavior, but if return_nans=True all zeros are replaced with NaNs before output. This is a very simplistic approach: Another way to do this would be to check the input matrices for NaNs and use this to supply NaNs in the output if return_nans=True. For example, if you somehow got a "true" correlation of zero, this would replace the zero with NaN even if there wasn't a NaN in the input. This PR references issue #400.

@snastase snastase requested a review from yidawang January 10, 2019 23:00
Copy link
Member

@yidawang yidawang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@snastase
Copy link
Contributor Author

I'm having a hard time understanding the test failures here—seems to be something to do with theano used by test_sssrm...? This is not modified in this PR. Any ideas? @mihaic

@mihaic
Copy link
Member

mihaic commented Jan 14, 2019

See PR #408.

@snastase snastase merged commit d03e7ee into brainiak:master Jan 14, 2019
@snastase snastase deleted the fcma-nans branch January 14, 2019 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants