FactorMixin
- class pyoptex.utils.factor.FactorMixin[source]
Factor Mixin to be used whenever creating a new factor class. This mixin contains common validation code and functions to normalize and denormalize columns based on the factors settings.
Attributes
- namestr
The name of the factor
- typestr
The type of the factor, can be ‘continuous’, ‘cont’, ‘categorical’, ‘cat’, ‘mixture’, ‘mixt’, ‘quantitative’, ‘quant’, ‘qualitative’, ‘qual’
- minfloat
The minimum of the factor. Used for continuous factors.
- maxfloat
The maximum of the factor. Used for continuous factors.
- levelslist(float) or list(str)
For continuous factors, this is the list of possible numerical values. For categorical factors, this is a list of strings for the possible categories.
- coordslist(np.array(2d))
Only possible for categorical factors. The list of encodings of each level.
- __init__()[source]
Methods
FactorMixin.denormalize(data)Denormalizes the data coming from this factor.
FactorMixin.normalize(data)Normalizes the data coming from this factor.
Validation of the settings.
Attributes
Extracts the encoded coordinates for the factor.
Check wether the factor is catgorical.
Checks whether the factor is continuous.
Checks wether the factor is a mixture.
The mean of the factor for normalization of a continuous factor.
The scale of the factor for normalization of a continuous factor.