humancompatible.detect.data_handler.features.Mixed module
- class humancompatible.detect.data_handler.features.Mixed.Mixed(training_vals: ndarray | Series, categ_value_names: list[int | str], map_to: list[float] | None = None, name: str | None = None, default_val: float = 0, monotone: Monotonicity = Monotonicity.NONE, modifiable: bool = True)[source]
Bases:
Feature- property bounds
- decode(vals: ndarray[float64], denormalize: bool = True, return_series: bool = True, discretize: bool = False) ndarray | Series[source]
Decodes the vals into the original form
- property default_val
- property default_val_normalized
- encode(vals: ndarray | Series, *args, **kwargs)
Encodes the vals
- encoding_width(one_hot: bool) int[source]
Returns the width of the encoded values, i.e., the size in teh second dimension (axis 1)
- property n_categorical_vals
- property numeric_vals
- property orig_vals
- property value_mapping