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 ability to re-run ICA when no/few BOLD components are found #662

Closed
tsalo opened this issue Jan 26, 2021 · 5 comments · Fixed by #663
Closed

Add ability to re-run ICA when no/few BOLD components are found #662

tsalo opened this issue Jan 26, 2021 · 5 comments · Fixed by #663
Labels
enhancement issues describing possible enhancements to the project

Comments

@tsalo
Copy link
Member

tsalo commented Jan 26, 2021

Summary

When no BOLD components are detected by the decision tree, it is possible that the ICA simply failed to produce components that adequately dissociated BOLD and non-BOLD signal sources by chance. Changing the random seed can help with this. It would be awesome to be able to feed information from the decision tree back into the decomposition (combining with the maxit and maxrestart parameters) to restart the decomposition with an updated seed.

This would require a substantial refactor, and would probably best work with an object-oriented approach...

Additional Detail

This stems from #659. In that case, changing the random seed was helpful in some subjects.

Next Steps

  1. Discuss.
  2. Come up with an implementation, in particular deciding between our current functional approach and an object-oriented one.
  3. Implement.
@tsalo tsalo added the enhancement issues describing possible enhancements to the project label Jan 26, 2021
@eurunuela
Copy link
Collaborator

Not the fanciest implementation but we could add a while or a for loop (I'm thinking 2 iterations max) that only runs for a second time if the number of BOLD components is below a certain threshold.

@tsalo
Copy link
Member Author

tsalo commented Jan 26, 2021

Good point. We could put that in the workflow function, although the ICA function would need to return the seed and/or number of restarts. Something like....

bad_decomp = True
n_restarts = 0
while bad_decomp:
    ica_results, n_restarts = ica_function(seed, maxrestarts=(maxrestarts - n_restarts))
    comptable, n_bold_comps = decision_tree(ica_results)
    seed += n_restarts
    if n_bold_comps > 2:
        bad_decomp = False

@eurunuela
Copy link
Collaborator

That looks good but I would limit the number of restarts. We don't want tedana to run for hours (I know it is an extreme case). So, I would restrict it to something like 2 or 3 restarts.

@tsalo
Copy link
Member Author

tsalo commented Jan 26, 2021

We already have a limit on restarts (maxrestarts), so I'd leverage that if possible. In most cases (especially our five-echo test dataset), the main overhead is the ICA restarts, rather than the decision tree. If your main concern is overhead, I think the optimal solution would be to propose reducing our default value for maxrestarts.

@eurunuela
Copy link
Collaborator

eurunuela commented Jan 26, 2021

Oh, I didn't see maxrestarts. Then yes, LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement issues describing possible enhancements to the project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants