energy_fault_detector.data_preprocessing.column_selector
- class ColumnSelector(max_nan_frac_per_col=0.05, features_to_exclude=None)
Bases:
DataTransformerClass for selecting columns, using the provided list of features to exclude/drop and the fraction of NaNs.
- Parameters:
- feature_names_in_
list of column names in input.
- n_features_in_
number of columns in input.
- feature_names_out_
list of column names to keep / selected.
- columns_dropped_
list of columns that were dropped.
- fit(x, y=None)
Find columns to keep for training
- Parameters:
x (
DataFrame) – data to filter based on NaN fractionsy (
Optional[array]) – target variable, currently unused.
- Return type:
- get_feature_names_out(input_features=None)
Returns the list of feature names in the output.
- inverse_transform(x)
Inverse transform does nothing in case of column selector - since the columns dropped are not reconstructed.
- Return type:
DataFrame
- transform(x)
Drop columns from dataframe x.
- Return type:
DataFrame