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

Add explanation for the assumption of what counts as signal in BRSA, correct default optimizer of BRSA #337

Merged
merged 47 commits into from Feb 21, 2018

Conversation

@lcnature
Copy link
Contributor

@lcnature lcnature commented Feb 16, 2018

add notes in the documentation for the different assumption in BRSA from traditional RSA on what counts as signal. Also corrected the mismatch between documentation and actual implementation of the default optimizer. L-BFGS-B appears to require less memory and fits faster in each iteration than BFGS. But it is possible that more iterations are needed because Hessian is approximated, so the default max number of iteration is increased

lcnature and others added 30 commits Sep 2, 2016
lcnature
a
 Changes to be committed:
	new file: brainiak/brsa/test.txt
lcnature
a
 Changes to be committed:
	new file: brainiak/brsa/test.txt
lcnature
a
 Changes to be committed:
	new file: brainiak/brsa/test.txt
lcnature
a
 Changes to be committed:
	new file: brainiak/brsa/test.txt
lcnature
a
 Changes to be committed:
	new file: brainiak/brsa/test.txt
lcnature
a
 Changes to be committed:
	new file: brainiak/brsa/test.txt
lcnature
a
 Changes to be committed:
	new file: brainiak/brsa/test.txt
lcnature
a
 Changes to be committed:
	new file: brainiak/brsa/test.txt
Please note that the model assumes that the covariance matrix U which
all \\beta_i follow is zero-meaned. For more details of its implication,
see documentation of `.BRSA`
Parameters
----------
n_iter : int. Default: 50

This comment has been minimized.

@mihaic

mihaic Feb 16, 2018
Contributor

Same.

under the assumption in BRSA, their similarity is 1; under the assumption
that only deviation of pattern from average patterns is signal of interest,
their similarity should be -1.
Parameters
----------
n_iter : int. Default: 50

This comment has been minimized.

@mihaic

mihaic Feb 16, 2018
Contributor

This a good example for why we should not list defaults in docstrings: it creates the need to change values in an additional place, which is frequently forgotten, such as in this PR.

My recommendation: do not list the default in the docstring; it is already visible in the HTML docs in the function definition.

@@ -178,7 +178,7 @@ def test_fit():
rank = n_C - 1
n_nureg = 1
brsa = BRSA(rank=rank, n_nureg=n_nureg, tol=2e-3,
n_iter=4, init_iter=4, auto_nuisance=True)
n_iter=20, init_iter=4, auto_nuisance=True)

This comment has been minimized.

@mihaic

mihaic Feb 16, 2018
Contributor

Is this the minimum number that works with L-BFGS-B? Just trying to minimize required time for tests.

@mihaic
Copy link
Contributor

@mihaic mihaic commented Feb 20, 2018

@lcnature, we are preparing a new release to incorporate PR #339. Will you address the comments (they are really simple) today or tomorrow to get this PR in?

@lcnature
Copy link
Contributor Author

@lcnature lcnature commented Feb 20, 2018

@mihaic Yes! I will resubmit today :)

Mingbo Cai and others added 4 commits Feb 20, 2018
…educed number of iteration in test code and increased that in brsa module.
Mingbo Cai
Mingbo Cai
@mihaic
mihaic approved these changes Feb 21, 2018
@mihaic mihaic merged commit 03d83c8 into brainiak:master Feb 21, 2018
4 of 5 checks passed
4 of 5 checks passed
codecov/project 88.34% (-0.13%) compared to 7004561
Details
codecov/patch Coverage not affected when comparing 7004561...2af9edd
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
linux Build finished.
Details
macos Build finished.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.