mne_rt.combiners.FeatureCombiner#

class mne_rt.combiners.FeatureCombiner(features: list[str] | None = None)[source]#

Bases: object

Abstract base class for multi-feature NF combiners.

Subclass this and implement combine() to define a custom mixing strategy. All combiners share the same one-method interface so they can be swapped in without changing the surrounding pipeline code.

Parameters:
featureslist of str | None, default None

Ordered list of modality names this combiner expects. If None the combiner accepts any keys present in the dict passed to combine(). Subclasses may require this to be set at construction time (e.g. WeightedSumCombiner).

Notes

The combiner receives a snapshot dict {modality_name: float} once per analysis window, immediately after the EMA smoothing step inside record_main(). The returned scalar replaces the per-modality values for protocol evaluation and display when a combiner is active.

__init__(features: list[str] | None = None) None[source]#

Methods

__init__([features])

combine(values)

Reduce a dict of per-modality NF values to one scalar.

combine(values: dict[str, float]) float[source]#

Reduce a dict of per-modality NF values to one scalar.

Parameters:
valuesdict[str, float]

Mapping of {modality_name: current_value} for all active modalities in the current window.

Returns:
mixedfloat

Single combined NF value passed downstream to the protocol and display.