tedana.selection.selection_nodes.calc_max_good_meanmetricrank
- calc_max_good_meanmetricrank(selector, decide_comps, metric_suffix=None, log_extra_info='', custom_node_label='', only_used_metrics=False)[source]
Calculate the metric “max_good_meanmetricrank”.
Calculates the max_good_meanmetricrank to use in the kundu decision tree. This is the number of components selected with decide_comps * the extend_factor calculated in calc_extend_factor
- Parameters:
selector (
ComponentSelector
) – If only_used_metrics is False, the updated selector is returned.decide_comps (
str
orlist[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.metric_suffix (
str
) – By default, this will output a value called “max_good_meanmetricrank” If this variable is not None or “” then it will output: “max_good_meanmetricrank_[metric_suffix]”. Default=Nonelog_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
“meanmetricrank” is the same as “d_table_score” and is used to set a threshold for the “d_table” values in the component table. This metric ranks the components based on 5 metrics and then outputs the mean rank across the 5 metrics. Thus “meanmetricrank” is a slightly more descriptive name but d_table was used in earlier versions of this code. It might be worth consistently using the same term, but this note will hopefully suffice for now.