franc.filtering.bypass
A filtering method that does conditioning
Classes
Implementation of a filtering method that just predicts zeros. |
Module Contents
- class franc.filtering.bypass.BypassFilter(n_channel, n_filter=1, idx_target=0)
Bases:
franc.filtering.common.FilterBaseImplementation of a filtering method that just predicts zeros.
Intended for testing and to get apply metrics to input data data.
- Parameters:
n_channel (int) – Number of witness sensor channels
n_filter (int) –
idx_target (int) –
all other parameters are ignored
>>> import franc as fnc >>> n_filter = 128 >>> witness, target = fnc.evaluation.TestDataGenerator(0.1).generate(int(1e5)) >>> filt = fnc.filtering.BypassFilter(1, n_filter, 0) >>> filt.condition(witness, target) >>> prediction = filt.apply(witness, target) # check on the data used for conditioning >>> float(sum(prediction)) 0.0
- filter_name: str = 'Bypass'
- requires_apply_target = False
- condition_multi_sequence(witness, target)
Use an input dataset to condition the filter
- Parameters:
witness (collections.abc.Sequence | collections.abc.Sequence[collections.abc.Sequence] | numpy.typing.NDArray) – Witness sensor data
target (collections.abc.Sequence | numpy.typing.NDArray) – Target sensor data
- Return type:
None
- apply_multi_sequence(witness, target=None, pad=True, update_state=False)
Apply the filter to input data
- Parameters:
witness (collections.abc.Sequence | numpy.typing.NDArray) – Witness sensor data
target (collections.abc.Sequence | numpy.typing.NDArray | None) – Target sensor data (is ignored)
pad (bool) – if True, apply padding zeros so that the length matches the target signal
update_state (bool) – ignored
- Returns:
prediction
- Return type:
list[numpy.typing.NDArray]