qualia_core.preprocessing package

Submodules

Module contents

class qualia_core.preprocessing.BandPassFilter(f1: float, f2: float, fs: float, sensorkind, dimension: str)[source]

Bases: Preprocessing

Band pass filter Requires fixed sampling frequency, do an interpolation before.

class qualia_core.preprocessing.Class2BinMatrix(classes: int = None)[source]

Bases: Preprocessing

Warning: must be applied after Window

class qualia_core.preprocessing.CopySet(source: str = 'train', dest: str = 'test', ratio: float = 0.1)[source]

Bases: Preprocessing[RawDataModel, RawDataModel]

import_data(dataset: Dataset[Any]) Dataset[Any][source]
class qualia_core.preprocessing.DatamodelConverter[source]

Bases: Preprocessing[HARDataModel, RawDataModel]

import_data(dataset: Dataset[Any]) Dataset[Any][source]
class qualia_core.preprocessing.DatasetSplitterBySubjects(source_subjects: list[Any], dest_subjects: list[Any], source: str = 'train', dest: str = 'test')[source]

Bases: Preprocessing[RawDataModel, RawDataModel]

Warning: must be applied after Window to get correct split and randomization of windows.

import_data(dataset: Dataset[Any]) Dataset[Any][source]
class qualia_core.preprocessing.DatasetSplitter(source: str = 'train', dest: str = 'test', ratio: float = 0.1)[source]

Bases: Preprocessing[RawDataModel, RawDataModel]

import_data(dataset: Dataset[Any]) Dataset[Any][source]
class qualia_core.preprocessing.MFCC(sample_rate: int, n_mfcc: int, dct_type: int = 2, norm: str = 'ortho', log_mels=False, melkwargs: dict = {}, chunks: int = 4, dims: int = 1)[source]

Bases: Preprocessing

class qualia_core.preprocessing.Normalize(method: str = 'z-score', axis: tuple[int, ...] = (0,), debug: bool = False)[source]

Bases: Preprocessing[RawDataModel, RawDataModel]

z_score(dataset: RawDataModel) RawDataModel[source]
min_max(datamodel: RawDataModel) RawDataModel[source]
methods: ClassVar[dict[str, Callable[[Self, RawDataModel], RawDataModel]]] = {'min-max': <function Normalize.min_max>, 'z-score': <function Normalize.z_score>}
class qualia_core.preprocessing.PrintHARDataModelSummary[source]

Bases: Preprocessing

log = []
class qualia_core.preprocessing.RemoveActivity(activities, noconvert: bool = False)[source]

Bases: Preprocessing

class qualia_core.preprocessing.RemoveSensor(sensorkinds, noconvert: bool = False)[source]

Bases: Preprocessing

class qualia_core.preprocessing.Reshape2DTo1D[source]

Bases: Preprocessing

class qualia_core.preprocessing.Window(size: int = 0, stride: int = 1, no_overlapping_labels: bool = True, unique_label_per_window: bool = True)[source]

Bases: Preprocessing

Warning: Must be applied before Class2BinMatrix and DatasetSplitter