Class: SelectorMixin

Transformer mixin that performs feature selection given a support mask

This mixin provides a feature selector implementation with transform and inverse_transform functionality given an implementation of _get_support_mask.

Examples

Python Reference

Constructors

new SelectorMixin()

new SelectorMixin(opts?): SelectorMixin

Parameters

ParameterTypeDescription
opts?object-
opts.fit_params?anyAdditional fit parameters.
opts.X?ArrayLike[]Input samples.
opts.y?ArrayLikeTarget values (undefined for unsupervised transformations).

Returns SelectorMixin

Defined in generated/feature_selection/SelectorMixin.ts:25

Properties

PropertyTypeDefault valueDefined in
_isDisposedbooleanfalsegenerated/feature_selection/SelectorMixin.ts:23
_isInitializedbooleanfalsegenerated/feature_selection/SelectorMixin.ts:22
_pyPythonBridgeundefinedgenerated/feature_selection/SelectorMixin.ts:21
idstringundefinedgenerated/feature_selection/SelectorMixin.ts:18
optsanyundefinedgenerated/feature_selection/SelectorMixin.ts:19

Accessors

py

Get Signature

get py(): PythonBridge

Returns PythonBridge

Set Signature

set py(pythonBridge): void

Parameters

ParameterType
pythonBridgePythonBridge

Returns void

Defined in generated/feature_selection/SelectorMixin.ts:45


X_new

Get Signature

get X_new(): Promise<any[]>

Transformed array.

Returns Promise<any[]>

Defined in generated/feature_selection/SelectorMixin.ts:326

Methods

dispose()

dispose(): Promise<void>

Disposes of the underlying Python resources.

Once dispose() is called, the instance is no longer usable.

Returns Promise<void>

Defined in generated/feature_selection/SelectorMixin.ts:97


fit_transform()

fit_transform(opts): Promise<any[]>

Fit to data, then transform it.

Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X.

Parameters

ParameterTypeDescription
optsobject-
opts.fit_params?anyAdditional fit parameters.
opts.X?ArrayLike[]Input samples.
opts.y?ArrayLikeTarget values (undefined for unsupervised transformations).

Returns Promise<any[]>

Defined in generated/feature_selection/SelectorMixin.ts:116


get_feature_names_out()

get_feature_names_out(opts): Promise<any>

Mask feature names according to selected features.

Parameters

ParameterTypeDescription
optsobject-
opts.input_features?anyInput features.

Returns Promise<any>

Defined in generated/feature_selection/SelectorMixin.ts:158


get_support()

get_support(opts): Promise<any>

Get a mask, or integer index, of the features selected.

Parameters

ParameterTypeDescription
optsobject-
opts.indices?booleanIf true, the return value will be an array of integers, rather than a boolean mask.

Returns Promise<any>

Defined in generated/feature_selection/SelectorMixin.ts:192


init()

init(py): Promise<void>

Initializes the underlying Python resources.

This instance is not usable until the Promise returned by init() resolves.

Parameters

ParameterType
pyPythonBridge

Returns Promise<void>

Defined in generated/feature_selection/SelectorMixin.ts:58


inverse_transform()

inverse_transform(opts): Promise<any>

Reverse the transformation operation.

Parameters

ParameterTypeDescription
optsobject-
opts.X?anyThe input samples.

Returns Promise<any>

Defined in generated/feature_selection/SelectorMixin.ts:226


set_output()

set_output(opts): Promise<any>

Set output container.

See Introducing the set_output API for an example on how to use the API.

Parameters

ParameterTypeDescription
optsobject-
opts.transform?"default" | "pandas" | "polars"Configure output of transform and fit_transform.

Returns Promise<any>

Defined in generated/feature_selection/SelectorMixin.ts:262


transform()

transform(opts): Promise<any>

Reduce X to the selected features.

Parameters

ParameterTypeDescription
optsobject-
opts.X?anyThe input samples.

Returns Promise<any>

Defined in generated/feature_selection/SelectorMixin.ts:294