Mostly bug fixing for brsa#144
Mostly bug fixing for brsa#144mihaic merged 39 commits intobrainiak:masterfrom lcnature:spatial_corr
Conversation
…eals with shared time series not explained by design matrix
Fixed some bugs in utils.ReadDesign Renamed epsilon to eta in consistence with the paper Expanded the example a bit Other minor changes
…eals with shared time series not explained by design matrix
Changes to be committed: modified: brainiak/reprsimil/brsa.py modified: brainiak/utils/utils.py modified: examples/reprsimil/brsa_representational_similarity_estimate_example.ipynb modified: tests/reprsimil/test_brsa.py modified: tests/utils/test_utils.py
…nto spatial_corr
brainiak/reprsimil/brsa.py
Outdated
| logger.info('You did not provide time seres of no interest ' | ||
|
|
||
| logger.info('You did not provide time series of no interest ' | ||
|
|
There was a problem hiding this comment.
You probably do not want these empty lines.
brainiak/reprsimil/brsa.py
Outdated
| LL, LAMBDA_i, LAMBDA, YTAcorrXL_LAMBDA, sigma2 \ | ||
| = self._calc_LL(rho1, LTXTAcorrXL, LTXTAcorrY, YTAcorrY, | ||
| X0TAX0, SNR2, n_V, n_T, n_run, rank, n_base) | ||
| except: |
There was a problem hiding this comment.
You must specify a particular exception and you must add that exception to the docstring of the function in a section called "Raises".
There was a problem hiding this comment.
OK I removed the try/except
brainiak/reprsimil/brsa.py
Outdated
| logger.debug('YTAcorrY: {}'.format(YTAcorrY)) | ||
| logger.debug('LTXTAcorrY: {}'.format(LTXTAcorrY)) | ||
| logger.debug('YTAcorrXL_LAMBDA: {}'.format(YTAcorrXL_LAMBDA)) | ||
| logger.debug('SNR2: {}'.format(SNR2)) |
There was a problem hiding this comment.
Have you thought if warnings.warn() or logger.warning are appropriate here?
There was a problem hiding this comment.
Here are some guidelines for when to use what:
https://docs.python.org/3/howto/logging.html#when-to-use-logging
There was a problem hiding this comment.
I changed to logger.warning
| "source": [ | ||
| "# This demo shows how to use the Bayesian Representational Similarity Analysis method in brainiak with a simulated dataset.\n", | ||
| "Questions can be directed to mcai [ at ] princeton [ dot ] edu" | ||
| "*Feedbacks and questions are welcome. Please direct them to mcai [ at ] princeton [ dot ] edu" |
There was a problem hiding this comment.
Not really what the change is about, but do you mind removing this line? We are already instructing users to open GitHub issues for BrainIAK or contact us on Gitter.
And some typo corrections.
The fitV and fitU steps in the _fit_diagV_noGP and _fit_diagV_GP functions are swapped when debugging. But I think the order does not matter so I did not swap them back.
Update example notebook to mention that z-scoring data is necessary.