Skip to content

Latest commit

 

History

History
400 lines (235 loc) · 10.1 KB

SelectFpr.md

File metadata and controls

400 lines (235 loc) · 10.1 KB

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

constructor()

Signature

new SelectFpr(opts?: object): SelectFpr;

Parameters

Name Type Description
opts? object -
opts.alpha? number Features with p-values less than alpha are selected. Default Value 0.05
opts.score_func? any Function 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

Methods

dispose()

Disposes of the underlying Python resources.

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

Signature

dispose(): Promise<void>;

Returns

Promise<void>

Defined in: generated/feature_selection/SelectFpr.ts:94

fit()

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

Signature

fit(opts: object): Promise<any>;

Parameters

Name Type Description
opts object -
opts.X? ArrayLike[] The training input samples.
opts.y? ArrayLike The target values (class labels in classification, real numbers in regression).

Returns

Promise<any>

Defined in: generated/feature_selection/SelectFpr.ts:111

fit_transform()

Fit to data, then transform it.

Fits transformer to X and y with optional parameters fit\_params and returns a transformed version of X.

Signature

fit_transform(opts: object): Promise<any[]>;

Parameters

Name Type Description
opts object -
opts.X? ArrayLike[] Input samples.
opts.fit_params? any Additional fit parameters.
opts.y? ArrayLike Target values (undefined for unsupervised transformations).

Returns

Promise<any[]>

Defined in: generated/feature_selection/SelectFpr.ts:153

get_feature_names_out()

Mask feature names according to selected features.

Signature

get_feature_names_out(opts: object): Promise<any>;

Parameters

Name Type Description
opts object -
opts.input_features? any Input features.

Returns

Promise<any>

Defined in: generated/feature_selection/SelectFpr.ts:200

get_metadata_routing()

Get metadata routing of this object.

Please check User Guide on how the routing mechanism works.

Signature

get_metadata_routing(opts: object): Promise<any>;

Parameters

Name Type Description
opts object -
opts.routing? any A MetadataRequest encapsulating routing information.

Returns

Promise<any>

Defined in: generated/feature_selection/SelectFpr.ts:238

get_support()

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

Signature

get_support(opts: object): Promise<any>;

Parameters

Name Type Description
opts object -
opts.indices? boolean If true, the return value will be an array of integers, rather than a boolean mask. Default Value false

Returns

Promise<any>

Defined in: generated/feature_selection/SelectFpr.ts:273

init()

Initializes the underlying Python resources.

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

Signature

init(py: PythonBridge): Promise<void>;

Parameters

Name Type
py PythonBridge

Returns

Promise<void>

Defined in: generated/feature_selection/SelectFpr.ts:55

inverse_transform()

Reverse the transformation operation.

Signature

inverse_transform(opts: object): Promise<any>;

Parameters

Name Type Description
opts object -
opts.X? any The input samples.

Returns

Promise<any>

Defined in: generated/feature_selection/SelectFpr.ts:308

set_output()

Set output container.

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

Signature

set_output(opts: object): Promise<any>;

Parameters

Name Type Description
opts object -
opts.transform? "default" | "pandas" Configure output of transform and fit\_transform.

Returns

Promise<any>

Defined in: generated/feature_selection/SelectFpr.ts:343

transform()

Reduce X to the selected features.

Signature

transform(opts: object): Promise<any>;

Parameters

Name Type Description
opts object -
opts.X? any The input samples.

Returns

Promise<any>

Defined in: generated/feature_selection/SelectFpr.ts:376

Properties

_isDisposed

boolean = false

Defined in: generated/feature_selection/SelectFpr.ts:23

_isInitialized

boolean = false

Defined in: generated/feature_selection/SelectFpr.ts:22

_py

PythonBridge

Defined in: generated/feature_selection/SelectFpr.ts:21

id

string

Defined in: generated/feature_selection/SelectFpr.ts:18

opts

any

Defined in: generated/feature_selection/SelectFpr.ts:19

Accessors

feature_names_in_

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

Signature

feature_names_in_(): Promise<ArrayLike>;

Returns

Promise<ArrayLike>

Defined in: generated/feature_selection/SelectFpr.ts:480

n_features_in_

Number of features seen during fit.

Signature

n_features_in_(): Promise<number>;

Returns

Promise<number>

Defined in: generated/feature_selection/SelectFpr.ts:455

pvalues_

p-values of feature scores.

Signature

pvalues_(): Promise<ArrayLike>;

Returns

Promise<ArrayLike>

Defined in: generated/feature_selection/SelectFpr.ts:432

py

Signature

py(): PythonBridge;

Returns

PythonBridge

Defined in: generated/feature_selection/SelectFpr.ts:42

Signature

py(pythonBridge: PythonBridge): void;

Parameters

Name Type
pythonBridge PythonBridge

Returns

void

Defined in: generated/feature_selection/SelectFpr.ts:46

scores_

Scores of features.

Signature

scores_(): Promise<ArrayLike>;

Returns

Promise<ArrayLike>

Defined in: generated/feature_selection/SelectFpr.ts:409