Class: SelectFpr

Filter: Select the pvalues below alpha based on a FPR test.

FPR test stands for false Positive Rate test. It controls the total amount of false detections.

Read more in the User Guide.

Python Reference

Constructors

new SelectFpr()

new SelectFpr(opts?): SelectFpr

Parameters

ParameterTypeDescription
opts?object-
opts.alpha?numberFeatures with p-values less than alpha are selected.
opts.score_func?anyFunction taking two arrays X and y, and returning a pair of arrays (scores, pvalues). Default is f_classif (see below “See Also”). The default function only works with classification tasks.

Returns SelectFpr

Defined in generated/feature_selection/SelectFpr.ts:25

Properties

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

Accessors

feature_names_in_

Get Signature

get feature_names_in_(): Promise<ArrayLike>

Names of features seen during fit. Defined only when X has feature names that are all strings.

Returns Promise<ArrayLike>

Defined in generated/feature_selection/SelectFpr.ts:464


n_features_in_

Get Signature

get n_features_in_(): Promise<number>

Number of features seen during fit.

Returns Promise<number>

Defined in generated/feature_selection/SelectFpr.ts:439


pvalues_

Get Signature

get pvalues_(): Promise<ArrayLike>

p-values of feature scores.

Returns Promise<ArrayLike>

Defined in generated/feature_selection/SelectFpr.ts:416


py

Get Signature

get py(): PythonBridge

Returns PythonBridge

Set Signature

set py(pythonBridge): void

Parameters

ParameterType
pythonBridgePythonBridge

Returns void

Defined in generated/feature_selection/SelectFpr.ts:42


scores_

Get Signature

get scores_(): Promise<ArrayLike>

Scores of features.

Returns Promise<ArrayLike>

Defined in generated/feature_selection/SelectFpr.ts:393

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/SelectFpr.ts:93


fit()

fit(opts): Promise<any>

Run score function on (X, y) and get the appropriate features.

Parameters

ParameterTypeDescription
optsobject-
opts.X?ArrayLike[]The training input samples.
opts.y?ArrayLikeThe target values (class labels in classification, real numbers in regression). If the selector is unsupervised then y can be set to undefined.

Returns Promise<any>

Defined in generated/feature_selection/SelectFpr.ts:110


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/SelectFpr.ts:149


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/SelectFpr.ts:191


get_metadata_routing()

get_metadata_routing(opts): Promise<any>

Get metadata routing of this object.

Please check User Guide on how the routing mechanism works.

Parameters

ParameterTypeDescription
optsobject-
opts.routing?anyA MetadataRequest encapsulating routing information.

Returns Promise<any>

Defined in generated/feature_selection/SelectFpr.ts:227


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/SelectFpr.ts:261


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/SelectFpr.ts:55


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/SelectFpr.ts:295


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/SelectFpr.ts:329


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/SelectFpr.ts:361