Binary indicators for missing values.
Note that this component typically should not be used in a vanilla Pipeline
consisting of transformers and a classifier, but rather could be added using a FeatureUnion
or ColumnTransformer
.
Read more in the User Guide.
new MissingIndicator(opts?: object): MissingIndicator;
Name | Type | Description |
---|---|---|
opts? |
object |
- |
opts.error_on_new? |
boolean |
If true , transform will raise an error when there are features with missing values that have no missing values in fit . This is applicable only when features='missing-only' . Default Value true |
opts.features? |
"all" | "missing-only" |
Whether the imputer mask should represent all or a subset of features. Default Value 'missing-only' |
opts.missing_values? |
string | number |
The placeholder for the missing values. All occurrences of missing\_values will be imputed. For pandas’ dataframes with nullable integer dtypes with missing values, missing\_values should be set to np.nan , since pd.NA will be converted to np.nan . |
opts.sparse? |
boolean | "auto" |
Whether the imputer mask format should be sparse or dense. Default Value 'auto' |
Defined in: generated/impute/MissingIndicator.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/impute/MissingIndicator.ts:113
Fit the transformer on X
.
fit(opts: object): Promise<any>;
Name | Type | Description |
---|---|---|
opts |
object |
- |
opts.X? |
ArrayLike |
Input data, where n\_samples is the number of samples and n\_features is the number of features. |
opts.y? |
any |
Not used, present for API consistency by convention. |
Promise
<any
>
Defined in: generated/impute/MissingIndicator.ts:130
Generate missing values indicator for X
.
fit_transform(opts: object): Promise<ArrayLike>;
Name | Type | Description |
---|---|---|
opts |
object |
- |
opts.X? |
ArrayLike |
The input data to complete. |
opts.y? |
any |
Not used, present for API consistency by convention. |
Promise
<ArrayLike
>
Defined in: generated/impute/MissingIndicator.ts:170
Get output feature names for transformation.
get_feature_names_out(opts: object): Promise<any>;
Name | Type | Description |
---|---|---|
opts |
object |
- |
opts.input_features? |
any |
Input features. |
Promise
<any
>
Defined in: generated/impute/MissingIndicator.ts:212
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/impute/MissingIndicator.ts:252
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/impute/MissingIndicator.ts:69
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/impute/MissingIndicator.ts:291
Generate missing values indicator for X
.
transform(opts: object): Promise<ArrayLike>;
Name | Type | Description |
---|---|---|
opts |
object |
- |
opts.X? |
ArrayLike |
The input data to complete. |
Promise
<ArrayLike
>
Defined in: generated/impute/MissingIndicator.ts:326
boolean
=false
Defined in: generated/impute/MissingIndicator.ts:23
boolean
=false
Defined in: generated/impute/MissingIndicator.ts:22
PythonBridge
Defined in: generated/impute/MissingIndicator.ts:21
string
Defined in: generated/impute/MissingIndicator.ts:18
any
Defined in: generated/impute/MissingIndicator.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/impute/MissingIndicator.ts:415
The features indices which will be returned when calling transform
. They are computed during fit
. If features='all'
, features\_
is equal to range(n\_features)
.
features_(): Promise<ArrayLike>;
Promise
<ArrayLike
>
Defined in: generated/impute/MissingIndicator.ts:361
Number of features seen during fit.
n_features_in_(): Promise<number>;
Promise
<number
>
Defined in: generated/impute/MissingIndicator.ts:388
py(): PythonBridge;
PythonBridge
Defined in: generated/impute/MissingIndicator.ts:56
py(pythonBridge: PythonBridge): void;
Name | Type |
---|---|
pythonBridge |
PythonBridge |
void
Defined in: generated/impute/MissingIndicator.ts:60