Skip to main content

GenericUnivariateSelect

Converter
DashAI.back.converters.scikit_learn.GenericUnivariateSelect

Select features using a configurable univariate statistical test and mode.

Supports multiple selection modes: k_best, percentile, fpr, fdr, and fwe. The scoring function and mode are configurable. Supervised: requires y at fit time.

Wraps scikit-learn's GenericUnivariateSelect.

Parameters

mode : string, default=percentile
Select features according to a percentile of the highest scores.
param, default=1e-05
Parameter of the mode.

Methods

fit(self, x: 'DashAIDataset', y: Optional[ForwardRef('DashAIDataset')] = None) -> 'FeatureSelectionConverter'

Defined on FeatureSelectionConverter

Fit the selector while remembering the input column types.

Parameters

x : DashAIDataset
The input dataset to fit the selector on.
y : DashAIDataset, optional
Target values for the supervised selectors. Defaults to None.

Returns

FeatureSelectionConverter
The fitted selector instance (self).

get_metadata(cls) -> 'Dict[str, Any]'

Defined on BaseConverter

Get metadata for the converter, used by the DashAI frontend.

Parameters

cls : type
The converter class (injected automatically by Python for classmethods).

Returns

Dict[str, Any]
Dictionary containing display name, short description, image preview path, category, icon, color, and whether the converter is supervised.

get_output_type(self, column_name: str = None) -> DashAI.back.types.dashai_data_type.DashAIDataType

Defined on FeatureSelectionConverter

Return the original DashAI data type of a retained column.

Parameters

column_name : str, optional
The name of the retained column. Defaults to None.

Returns

DashAIDataType
The original type of the column. Falls back to float64 when the input type is unknown (feature selectors only operate on numbers).

get_schema(cls) -> dict

Defined on ConfigObject

Generates the component related Json Schema.

Returns

dict
Dictionary representing the Json Schema of the component.

transform(self, x: 'DashAIDataset', y: Optional[ForwardRef('DashAIDataset')] = None) -> 'DashAIDataset'

Defined on SklearnWrapper

Transform the data using the fitted scikit-learn transformer.

Parameters

x : DashAIDataset
The input dataset to transform.
y : DashAIDataset, optional
Not used. Present for API consistency. Defaults to None.

Returns

DashAIDataset
The transformed dataset with updated DashAI column types.

validate_and_transform(self, raw_data: dict) -> dict

Defined on ConfigObject

It takes the data given by the user to initialize the model and returns it with all the objects that the model needs to work.

Parameters

raw_data : dict
A dictionary with the data provided by the user to initialize the model.

Returns

dict
A validated dictionary with the necessary objects.