tedana icon indicating copy to clipboard operation
tedana copied to clipboard

Divergence between older MEICA component selection and tedana

Open handwerkerd opened this issue 2 years ago • 0 comments

Summary

As part of the review for #924, we noticed a divergence between the older MEICA decision tree and the one tedana has been using for years. There are several edge-case criteria which MEICA applies to the same subject of remaining components while tedana only applies to components that weren't changed by earlier edge case criteria.

Additional Detail

In the MEICA code, all the steps we now label I009-I012 were done on the same subset of components. https://github.com/ME-ICA/me-ica/blob/53191a7e8838788acf837fdf7cb3026efadf49ac/meica.libs/select_model.py#L344-L360 ncl (now unclf) is assigned before this section and isn't changed until the end of the section. In tedana Main, after each classification step, we see:

tedana/tedana/selection/tedica.py

Line 375 in f00cb25 unclf = np.setdiff1d(unclf, midk)

In practice, what this means is that the components rejected with I009 or I010 are NOT candidates to be ignored in I011 and I012 while they can change from rejected (actually midk) to ignored in the original MEICA. This vaguely makes sense since the goal of these final steps is to retain a few things that might have otherwise been rejected. That said, I011 and I012 operate on all remaining unclassified components so they can and do change components from accepted to ignored. All four of these steps are classifying based on different thresholds for variance explained & d_table_score_scrub so it would take a bit more thinking to see how they all interact.

Next Steps

  • This will be a breaking change, but it is not necessarily a bug since both the MEICA and tedana decision trees are plausible, but different. The MEICA decision tree will end up accepting more components, so it's a bit more conservative.
  • Since this has been how tedana has functioned for years, several of us informally decided NOT to fix this divergence until the massive refactor in #756 is merged. Then the current tedana main will give the same results as tedana main has been giving for years and the newer modularized decision tree will match those results. (Additionally it will be nice to change this once rather than making and tests separate fixes both for main and #756)
  • After #756 is merged, we can create a new PR to have the decision tree line up with the older MEICA steps.

handwerkerd avatar Feb 02 '23 20:02 handwerkerd