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.
new SelectFpr(opts?: object): SelectFpr;
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. |
Defined in: generated/feature_selection/SelectFpr.ts:25
Disposes of the underlying Python resources.
Once dispose()
is called, the instance is no longer usable.
dispose(): Promise<void>;
Promise
<void
>
Defined in: generated/feature_selection/SelectFpr.ts:94
Run score function on (X, y) and get the appropriate features.
fit(opts: object): Promise<any>;
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). |
Promise
<any
>
Defined in: generated/feature_selection/SelectFpr.ts:111
Fit to data, then transform it.
Fits transformer to X
and y
with optional parameters fit\_params
and returns a transformed version of X
.
fit_transform(opts: object): Promise<any[]>;
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). |
Promise
<any
[]>
Defined in: generated/feature_selection/SelectFpr.ts:153
Mask feature names according to selected features.
get_feature_names_out(opts: object): Promise<any>;
Name | Type | Description |
---|---|---|
opts |
object |
- |
opts.input_features? |
any |
Input features. |
Promise
<any
>
Defined in: generated/feature_selection/SelectFpr.ts:200
Get metadata routing of this object.
Please check User Guide on how the routing mechanism works.
get_metadata_routing(opts: object): Promise<any>;
Name | Type | Description |
---|---|---|
opts |
object |
- |
opts.routing? |
any |
A MetadataRequest encapsulating routing information. |
Promise
<any
>
Defined in: generated/feature_selection/SelectFpr.ts:238
Get a mask, or integer index, of the features selected.
get_support(opts: object): Promise<any>;
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 |
Promise
<any
>
Defined in: generated/feature_selection/SelectFpr.ts:273
Initializes the underlying Python resources.
This instance is not usable until the Promise
returned by init()
resolves.
init(py: PythonBridge): Promise<void>;
Name | Type |
---|---|
py |
PythonBridge |
Promise
<void
>
Defined in: generated/feature_selection/SelectFpr.ts:55
Reverse the transformation operation.
inverse_transform(opts: object): Promise<any>;
Name | Type | Description |
---|---|---|
opts |
object |
- |
opts.X? |
any |
The input samples. |
Promise
<any
>
Defined in: generated/feature_selection/SelectFpr.ts:308
Set output container.
See Introducing the set_output API for an example on how to use the API.
set_output(opts: object): Promise<any>;
Name | Type | Description |
---|---|---|
opts |
object |
- |
opts.transform? |
"default" | "pandas" |
Configure output of transform and fit\_transform . |
Promise
<any
>
Defined in: generated/feature_selection/SelectFpr.ts:343
Reduce X to the selected features.
transform(opts: object): Promise<any>;
Name | Type | Description |
---|---|---|
opts |
object |
- |
opts.X? |
any |
The input samples. |
Promise
<any
>
Defined in: generated/feature_selection/SelectFpr.ts:376
boolean
=false
Defined in: generated/feature_selection/SelectFpr.ts:23
boolean
=false
Defined in: generated/feature_selection/SelectFpr.ts:22
PythonBridge
Defined in: generated/feature_selection/SelectFpr.ts:21
string
Defined in: generated/feature_selection/SelectFpr.ts:18
any
Defined in: generated/feature_selection/SelectFpr.ts:19
Names of features seen during fit. Defined only when X
has feature names that are all strings.
feature_names_in_(): Promise<ArrayLike>;
Promise
<ArrayLike
>
Defined in: generated/feature_selection/SelectFpr.ts:480
Number of features seen during fit.
n_features_in_(): Promise<number>;
Promise
<number
>
Defined in: generated/feature_selection/SelectFpr.ts:455
p-values of feature scores.
pvalues_(): Promise<ArrayLike>;
Promise
<ArrayLike
>
Defined in: generated/feature_selection/SelectFpr.ts:432
py(): PythonBridge;
PythonBridge
Defined in: generated/feature_selection/SelectFpr.ts:42
py(pythonBridge: PythonBridge): void;
Name | Type |
---|---|
pythonBridge |
PythonBridge |
void
Defined in: generated/feature_selection/SelectFpr.ts:46
Scores of features.
scores_(): Promise<ArrayLike>;
Promise
<ArrayLike
>
Defined in: generated/feature_selection/SelectFpr.ts:409