nnbma.operators package
Submodules
nnbma.operators.base module
nnbma.operators.normalization module
- class nnbma.operators.normalization.InverseNormalizer(df: DataFrame, norm_type: NormTypes)[source]
Bases:
OperatorSpecific operator that reverts a specified normalization of the dataset.
- Parameters:
df (pd.DataFrame) – dataset to be normalized.
norm_type (NormTypes) – type of normalization to revert.
- class nnbma.operators.normalization.NormTypes(value)[source]
Bases:
EnumTypes of normalization
- MEAN0 = 1
Center the columns, i.e., set their means to 0.
- MEAN0STD1 = 3
Center and reduce the columns, i.e., set their means to 0 and their variances to 1.
- MIN0MAX1 = 4
Apply a MinMax normalization, i.e., set the minimum value of each column to 0 and the maximum to 1.
- MIN1MAX1 = 5
Apply an alternative MinMax normalization, i.e., set the minimum value of each column to -1 and the maximum to 1.
- NONE = 0
No normalization.
- STD1 = 2
Reduce the columns, i.e., set their variances to 1.
- class nnbma.operators.normalization.Normalizer(df: DataFrame, norm_type: NormTypes)[source]
Bases:
OperatorSpecific operator that applies a specified normalization of the dataset.
- Parameters:
df (pd.DataFrame) – dataset to be normalized.
norm_type (NormTypes) – type of normalization to be applied.
nnbma.operators.operator module
- class nnbma.operators.operator.ColumnwiseOperator(ops: List[Callable[[ndarray], ndarray]])[source]
Bases:
OperatorClass that stores a list of operators – one per column of the dataset to be considered. It defines a pre-processing on the dataset.
- Parameters:
ops (List[Callable[[np.ndarray], np.ndarray]]) – list of operators or composition of operators, with one per column of the dataset to be pre-processed.
- class nnbma.operators.operator.Operator(fun: Callable[[ndarray], ndarray])[source]
Bases:
objectClass that stores a transformation to be applied to a full dataset or to one column.
- Parameters:
fun (Callable[[np.ndarray], np.ndarray]) – any function that returns numpy.arrays with the same size as its input.