eelbrain.pipeline.LabelVar
- class eelbrain.pipeline.LabelVar(source, codes, default=True, task=None, fnmatch=False)
Variable assigning labels to values
- Parameters:
source (str) – Variable supplying the values (e.g.,
"value").codes (dict[str | float | tuple[str, ...] | tuple[float, ...], str | float]) – Mapping values in
sourceto values in the new variable. The type of the values determines whether the output is aFactor(strvalues) or aVar(numerical values).default (bool | str | float) – Label for values not in
codes. By default, this is''for categorial and 0 for numerical output. Set toFalseto pass through unlabeled input values.task (str) – Only apply the variable to events from this task.
See also