-
Notifications
You must be signed in to change notification settings - Fork 0
init is only X and not X, active_set #3
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
Conversation
mne/mixed_norm/optim.py
Outdated
There was a problem hiding this comment.
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))
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
init is only X and not X, active_set
|
ok merged |
|
thanks ! |
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.