data_preprocessing.angle_transformer
- class AngleTransformer(angles=None, trust_bad_angles=False)[source]
Bases:
DataTransformerTransforms features containing angles to their sine and cosine values. Currently, assumes all angles are in degrees.
- angles
List of feature names (str) which are angles that need to be transformed.
- trust_bad_angles
If True angle features that neither suit the value range (-180, 180) nor (0, 360) will be transformed the same way as valid angles. If False, out of range angle features will be dropped.
- fit(x, y=None)[source]
Sets feature names in and out and detects value ranges of angle features.
- Return type:
- get_feature_names_out(input_features=None)[source]
Returns the list of feature names output by the angle transformation step.
- Return type:
List[str]