Skip to content

Add Bayesian RSA to the package (reprsimil) - #98

Merged
mihaic merged 63 commits into
brainiak:masterfrom
lcnature:add_brsa
Sep 22, 2016
Merged

mihaic merged 63 commits into
brainiak:masterfrom
lcnature:add_brsa

Conversation

@lcnature

@lcnature lcnature commented Sep 7, 2016

Copy link
Copy Markdown
Contributor

Bayesian RSA stands for Bayesian representational similarity analysis.
The code should be functional.
Planned updates for the upcoming weeks:
(1) add an example as a python notebook
(2) upload supplementary file including the derivation of the gradient of log likelihood
(3) capability of modeling the spatial correlation of noise

@buildbot-princeton

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

1 similar comment
@buildbot-princeton

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@mihaic

mihaic commented Sep 7, 2016

Copy link
Copy Markdown
Member

Add to whitelist.

@mihaic

mihaic commented Sep 7, 2016

Copy link
Copy Markdown
Member

Thank you for the PR, @lcnature.

Could you please recommend someone who is familiar with your work and can assess the neuroscience validity of the code?

Also, is pr-check passing for you? I tried on my computer and run-checks is failing just like on Jenkins because of trailing whitespace:

brainiak/reprsimil/brsa.py:23:31: W291 trailing whitespace
brainiak/reprsimil/brsa.py:123:14: W291 trailing whitespace

@lcnature

lcnature commented Sep 8, 2016 •

Copy link
Copy Markdown
Contributor Author

Sorry @mihaic . I made some changes to the docstring after it passed the last time.
The trailing whitespace was fixed but now I have errors about unexpected indentation in docstring, which I cannot find why.

@mihaic

mihaic commented Sep 8, 2016

Copy link
Copy Markdown
Member

That's perfectly OK. You can make as many commits you want, there is no issue with having test failures. :)

The line number in the doc building errors are very misleading (see issue #42).

You need an empty line before "Parameters".

@lcnature

lcnature commented Sep 8, 2016

Copy link
Copy Markdown
Contributor Author

Thanks @mshvartsman who has kindly agreed to review. I will let you know after I upload more documentation of the maths.

@lcnature

lcnature commented Sep 8, 2016

Copy link
Copy Markdown
Contributor Author

@mihaic How can I know why the check with macos failed?

@yidawang

yidawang commented Sep 8, 2016

Copy link
Copy Markdown
Member

@lcnature Within Princeton network, you can click the Details to see. It looks like it is an import error related to FCMA, which is weird because FCMA is not yet merged. @mihaic may have some idea about this?

@lcnature

lcnature commented Sep 8, 2016

Copy link
Copy Markdown
Contributor Author

@yidawang In fact I do not have read permission -- access denied even after logging in.

@yidawang

yidawang commented Sep 8, 2016

Copy link
Copy Markdown
Member

@lcnature I don't even know there are permission settings out there. In the "console output" I can see the code tries to import brainiak.fcma.cython_blas which is not supposed to be in the current codebase.

@mihaic

mihaic commented Sep 8, 2016

Copy link
Copy Markdown
Member

Retest this please.

@mihaic

mihaic commented Sep 8, 2016

Copy link
Copy Markdown
Member

The error was caused by leftovers from previous PR builds, which were preventing the documentation from building. So not related to the new code. I added a clean step to the builder (I am sure I had added it before and it magically disappeared...) to prevent this from happening again.

Unfortunately, the Jenkins results are only visible to people with Jenkins accounts. I will talk to the admin to see if we can make the results public.

Comment thread brainiak/reprsimil/brsa.py Outdated
.. [Cai2016] "Unbiased Bayesian estimation of
neural representational similarity structure",
M.B. Cai, N. Schuck, J. Pillow, Y. Niv,
Neural Information Processing System 29, 2016.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

small typo: Neural Information Processing Systems

@lcnature

Copy link
Copy Markdown
Contributor Author

@mihaic I cannot tell what causes a failure in Travid CI test:
https://travis-ci.org/IntelPNI/brainiak/jobs/161177341

@mihaic

mihaic commented Sep 20, 2016

Copy link
Copy Markdown
Member

@lcnature No clue. The error was only on MacOS. The tests passed on MacOS on Jenkins, so I restarted the Travis test.

@mihaic

mihaic commented Sep 20, 2016

Copy link
Copy Markdown
Member

@lcnature More evidence that the best approach for solving computer errors is restarting. :)

@lcnature lcnature closed this Sep 20, 2016
@lcnature lcnature reopened this Sep 20, 2016

@mshvartsman mshvartsman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think ready to go out there and get its tires kicked.

Comment thread brainiak/utils/utils.py Outdated
self.design_used = np.insert(self.design_used, 0, 1, axis=1)
self.n_TR = np.size(self.design_used, axis=0)

def readAFNI(self, fname):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Method names should be lowercase, with optional underscores for readability:
https://www.python.org/dev/peps/pep-0008/#method-names-and-instance-variables

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks. Done

Comment thread brainiak/utils/utils.py Outdated
return corr


class read_design:

@mihaic mihaic Sep 20, 2016 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Class names should be use the CapWords capitalization convention:
https://www.python.org/dev/peps/pep-0008/#class-names
While for the code that closely follows the formulas in the paper we can disregard this rule, please follow it here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

@lcnature

Copy link
Copy Markdown
Contributor Author

This time travis-CI throws some details for its failure. It looks like some problem with pytest iteslf.

@mihaic

mihaic commented Sep 21, 2016

Copy link
Copy Markdown
Member

@lcnature Please update the branch so I can merge it.

@lcnature

Copy link
Copy Markdown
Contributor Author

@mihaic Thanks Mihai, I updated and travis-CI failed again...

@mihaic
mihaic merged commit 669f041 into brainiak:master Sep 22, 2016
@mihaic

mihaic commented Sep 22, 2016

Copy link
Copy Markdown
Member

@lcnature Thank you very much for your contribution and for addressing the issues that came up during the review (thanks for pointing them out, @mshvartsman).
We will be looking into the Travis failure.

@lcnature
lcnature deleted the add_brsa branch September 22, 2016 16:58
yidawang added a commit to yidawang/brainiak that referenced this pull request Sep 27, 2016
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.

5 participants