tedana.selection.selection_nodes.dec_variance_lessthan_thresholds

dec_variance_lessthan_thresholds(selector, if_true, if_false, decide_comps, var_metric='variance explained', single_comp_threshold=0.1, all_comp_threshold=1.0, log_extra_info='', custom_node_label='', only_used_metrics=False, tag_if_true=None, tag_if_false=None)[source]

Change classifications for components with variance<single_comp_threshold.

If the sum of the variance for all components that meet this criteria is greater than all_comp_threshold then only change classifications for the lowest variance components where the sum of their variances is less than all_comp_threshold

Parameters:
  • selector (ComponentSelector) – If only_used_metrics is False, the updated selector is returned.

  • tag_if_true (str) – The classification tag to apply if a component is classified True. Default=””.

  • tag_if_false (str) – The classification tag to apply if a component is classified False. Default=””.

  • decide_comps (str or list[str]) – What classification(s) to operate on. using default or intermediate_classification labels. For example: decide_comps=’unclassified’ means to operate only on unclassified components. Use ‘all’ to include all components.

  • var_metric (str) – The name of the metric in component_table for variance. Default=”variance explained” This is an option so that it is possible to use “normalized variance explained” or another metric

  • single_comp_threshold (float) – The threshold for which all components need to have lower variance. Default=0.1

  • all_comp_threshold (:obj: float) – The number of the variance for all components less than single_comp_threshold needs to be under this threshold. Default=1.0

  • log_extra_info (str) – Additional text to the information log. Default=””.

  • custom_node_label (str) – A short label to describe what happens in this step. If “” then a label is automatically generated. Default=””.

  • only_used_metrics (bool) – If True, only return the component_table metrics that would be used. Default=False.

  • tag_if_true (str) – The classification tag to apply if a component is classified True. Default=””.

  • tag_if_false (str) – The classification tag to apply if a component is classified False. Default=””.

Returns:

  • selector (ComponentSelector) – If only_used_metrics is False, the updated selector is returned.

  • used_metrics (set(str)) – If only_used_metrics is True, the names of the metrics used in the function are returned.