tedana.selection.selection_utils.log_decision_tree_step
- log_decision_tree_step(function_name_idx, comps2use, decide_comps=None, n_true=None, n_false=None, if_true=None, if_false=None, calc_outputs=None)[source]
Log text to add after every decision tree calculation.
- Parameters:
function_name_idx (
str
) – The name of the function that should be logged. By convention, this be “Stepcurrent_node_idx_
: function_name”comps2use (
list[int]
or -1) – A list of component indices that should be used by a function. Only used to report no components found if empty and report the number of components found if not empty. Note:calc_
functions that don’t use component metrics do not need to use the component_table and may not require selecting components. For those functions, set comps2use==-1 to avoid logging a warning that no components were found. Currently, this is only used by calc_extend_factordecide_comps (
str
orlist[str]
orlist[int]
) – This is string or a list of strings describing what classifications of components to operate on. Only used in this function to report its contents if no components with these classifications were foundn_true, n_false (
int
) – The number of components classified as True or Falseif_true, if_false (
str
) – If a component is true or false, the classification to assign that componentcalc_outputs (
dict
) – A dictionary with output information from the function. If it contains a key “calc_cross_comp_metrics” then the value for that key is a list of cross component metrics (i.e. kappa or rho elbows) that were calculated within the function. Each of those metrics will also be a key in calc_outputs and those keys and values will be logged by this function
- Returns:
Information is added to the LGR.info logger. This either logs that
nothing was changed, the number of components classified as true or
false and what they changed to, or the cross component metrics that were
calculated