Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rsa.PDTS multiple regression #373

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

rsa.PDTS multiple regression #373

wants to merge 1 commit into from

Conversation

rystoli
Copy link

@rystoli rystoli commented Oct 13, 2015

Adds optional argument to rsa.PDistTargetSimilarity 'control_dsms', allowing RSA with multiple regression - looking at relation between neural and 'target DMs, controlling for other DMs (e.g., you may wish to control for multiple visual model DMs when looking at similarity structure in ventral temporal cortex).

  • 'control_dsms' is a list of squareformed DMs you wish to control for in a multiple regression.
  • Returns the r/rho coefficient for the target_dsm, controlling for any DMs in control_dsms. The r/rho coefficient returned is just the standard conversion of a OLS beta coefficient to an r coefficient for consistency in output ( beta * (sd(x) / sd(y)) ).

@@ -199,12 +202,15 @@ class PDistTargetSimilarity(Measure):
If True, return only the correlation coefficient (rho), otherwise
return rho and probability, p.""")

def __init__(self, target_dsm, **kwargs):
def __init__(self, target_dsm, control_dsms = None, **kwargs):
Copy link
Member

Choose a reason for hiding this comment

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

very minor nit-picking: there should be no spaces around = within keyword definitions of 'def'.
Also all the optional parameters to this, as you can see above this line, specified as "Parameters".

Copy link
Member

Choose a reason for hiding this comment

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

benefit is that it then automagically be listed by __str__ and __repr__ of this method

@yarikoptic
Copy link
Member

and now we would need to get some testing done -- look/extend mvpa2/tests/test_rsa.py.

@yarikoptic yarikoptic modified the milestone: 2.4.2 Nov 19, 2015
@mih
Copy link
Member

mih commented Jan 11, 2016

@rystoli Are you interested in finishing this PR up?

@rystoli
Copy link
Author

rystoli commented Jan 11, 2016

Hi all,

Sorry for the delay.

We are trying to sort out whether we should set up something to take into account concerns of certain distance types linearly summing and if that should affect how neural distance is computed when using multiple regression (eg).

Also, I actually have to confess I'm at a loss for how exactly these tests are run that Yarik forwarded to me (he asked to to extend on these): mvpa2/tests/test_rsa.py. I am relatively amateur still with my coding chops and am not sure what / how to implement these. Any help would be appreciated!

Thanks!

@rystoli
Copy link
Author

rystoli commented Jan 11, 2016

example of the distance summation concern: http://biorxiv.org/content/biorxiv/early/2015/10/21/029603.full.pdf

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.

None yet

3 participants