Standardize
- class gpype.backend.transform.standardize.Standardize[source]
Bases:
Fittable,IONodePer-channel z-score, fitted offline and applied unchanged online.
The first fittable node (D-BATCH-93): each signal channel’s mean and standard deviation, learned once from a whole recording via
fit(), then subtracted and divided out of every frame afterwards – in a batch run over the same recording, or in a realtime deployment reading live from an amplifier. The two produce the same numbers because both call the same private transform; fitting and deploying are two different methods precisely so that neither can drift from the other (seegpype.backend.core.fittable).Only the channels the port context calls
signalare touched – an index or trigger channel standardized alongside the signal would lose the meaning of its own values. Those channels declare no unit afterwards: a z-score has none.- Parameters:
ddof (
int) – Delta degrees of freedom for the fitted standard deviation, as innumpy.std. 0 (the default) is the population estimate; 1 is the sample estimate.**kwargs – Additional arguments for the parent
IONode.
- __init__(ddof=0, **kwargs)[source]
Initialize the IONode with input and output port configurations.
- Parameters:
input_ports – List of input port configurations or None.
output_ports – List of output port configurations or None.
**kwargs – Additional arguments passed to parent classes.
- setup(data, port_context_in)[source]
Resolve which channels are signal, ahead of fitting or applying.
- fit(block, context)[source]
Compute each signal channel’s mean and standard deviation.
- Parameters:
- Return type:
- Returns:
{"mean": ..., "std": ...}, one entry per signal channel.