tedana.selection.selection_nodes.calc_revised_meanmetricrank_guesses

calc_revised_meanmetricrank_guesses(selector, decide_comps, restrict_factor=2, log_extra_info='', custom_node_label='', only_used_metrics=False)[source]

Calculate a new d_table_score (meanmetricrank).

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.

  • restrict_factor (int or float) – A scaling factor to scale between num_acc_guess and conservative_guess. Default=2.

log_extra_infostr

Additional text to the information log. Default=””.

custom_node_labelstr

A short label to describe what happens in this step. If “” then a label is automatically generated. Default=””.

only_used_metricsbool

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

These measures are used in the original kundu decision tree. Since the d_table_rank is a mean rank across 5 metrics, those ranks will change when they’re calculated on a subset of components. It’s unclear how much the relative magnitudes will change and when the recalculation will affect results, but this was in the original kundu tree and will be replicated here to allow for comparisions

This also hard-codes for kappa_elbow_kundu and rho_elbow_kundu in the cross component metrics. If someone decides to keep using this function with other elbow thresholds, the code would need to be altered to account for that.

This function also saves the following cross_component_metrics:
  • num_acc_guess, a guess on the final number of accepted components,

  • restrict_factor, an input to this function used for scaling,

  • conservative_guess, a conservative guess of the final number of accepted components calculated as the ratio of num_acc_guess to restrict_factor.