tedana.selection.selection_nodes.calc_kappa_elbow

calc_kappa_elbow(selector, decide_comps, log_extra_info='', custom_node_label='', only_used_metrics=False)[source]

Calculate elbow for kappa across components.

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

  • 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.

  • 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.

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.

Note

This function is currently hard coded for a specific way to calculate the kappa elbow based on the method by Kundu in the MEICA v2.5 code. This uses the minimum of a kappa elbow calculation on all components and on a subset of kappa values below a significance threshold. To get the same functionality as in MEICA v2.5, decide_comps must be ‘all’.

varex_upper_p isn’t used for anything in this function, but it is calculated on kappa values and is used in rho_elbow_kundu_liberal and dec_reclassify_high_var_comps. For several reasons it made more sense to calculate here. This also means the kappa elbow should be calculated before those two other functions are called