Skip to content

Conversation

@joewalter
Copy link
Collaborator

Init is now X_init, which is either None or the previous source estimate. Active set is not transferred using Init as it is not used but overwritten in the _solver functions. Nosetests run without error.

Copy link
Owner

Choose a reason for hiding this comment

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

the purpose is to never store a full X with n_sources, n_times but just the non zeros. In other words we should never have to do : np.zeros((n_sources, n_times))

Copy link
Owner

Choose a reason for hiding this comment

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

use init with (X, active set) is a simple way to have a sparse row matrix.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

but you already transfer X restricted to the active set (both _solver functions do this restriction) and G[:, active_set] to the _solver functions. So active_set (which is defined on the full leadfield) has no real meaning in the _solver functions as it points to the full leadfield.

In the first iteration, X will be a dense matrix, but then as soon as we use init, X will be nonzero in rows corresponding to the old active set

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In the init case, the matrix I pass, is still the old one, which is a matrix n_new_as x n_times, with non_zeros in n_old_as rows and zeros otherwise

agramfort added a commit that referenced this pull request Dec 10, 2012
init is only X and not X, active_set
@agramfort agramfort merged commit 7060bff into agramfort:CD_mxne Dec 10, 2012
@agramfort
Copy link
Owner

ok merged

@agramfort
Copy link
Owner

thanks !

agramfort pushed a commit that referenced this pull request Jul 13, 2015
agramfort pushed a commit that referenced this pull request Mar 5, 2018
* Add functions to create random parcellation

* add test for random_parcellation

* add random_parcellation to python_reference

* fixe pep8

* fixe pep8 #2

* fixe pep #3

* add random_state, small corrections

* fixes random_state

* FIX: Alphabetical
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.

2 participants