Center an arbitrary kernel matrix \(K\).
Let define a kernel \(K\) such that:
new KernelCenterer(opts?: object): KernelCenterer;
Name | Type | Description |
---|---|---|
opts? |
object |
- |
opts.K_fit_all_? |
number |
Average of kernel matrix. |
opts.K_fit_rows_? |
ArrayLike |
Average of each column of kernel matrix. |
opts.feature_names_in_? |
ArrayLike |
Names of features seen during fit. Defined only when X has feature names that are all strings. |
opts.n_features_in_? |
number |
Number of features seen during fit. |
Defined in: generated/preprocessing/KernelCenterer.ts:23
Disposes of the underlying Python resources.
Once dispose()
is called, the instance is no longer usable.
dispose(): Promise<void>;
Promise
<void
>
Defined in: generated/preprocessing/KernelCenterer.ts:107
Fit KernelCenterer.
fit(opts: object): Promise<any>;
Name | Type | Description |
---|---|---|
opts |
object |
- |
opts.K? |
ArrayLike [] |
Kernel matrix. |
opts.y? |
any |
Ignored. |
Promise
<any
>
Defined in: generated/preprocessing/KernelCenterer.ts:124
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/preprocessing/KernelCenterer.ts:164
Get output feature names for transformation.
The feature names out will prefixed by the lowercased class name. For example, if the transformer outputs 3 features, then the feature names out are: \["class\_name0", "class\_name1", "class\_name2"\]
.
get_feature_names_out(opts: object): Promise<any>;
Name | Type | Description |
---|---|---|
opts |
object |
- |
opts.input_features? |
any |
Only used to validate feature names with the names seen in fit . |
Promise
<any
>
Defined in: generated/preprocessing/KernelCenterer.ts:213
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/preprocessing/KernelCenterer.ts:251
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/preprocessing/KernelCenterer.ts:61
Request metadata passed to the fit
method.
Note that this method is only relevant if enable\_metadata\_routing=True
(see sklearn.set\_config
). Please see User Guide on how the routing mechanism works.
The options for each parameter are:
set_fit_request(opts: object): Promise<any>;
Name | Type | Description |
---|---|---|
opts |
object |
- |
opts.K? |
string | boolean |
Metadata routing for K parameter in fit . |
Promise
<any
>
Defined in: generated/preprocessing/KernelCenterer.ts:290
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/preprocessing/KernelCenterer.ts:327
Request metadata passed to the transform
method.
Note that this method is only relevant if enable\_metadata\_routing=True
(see sklearn.set\_config
). Please see User Guide on how the routing mechanism works.
The options for each parameter are:
set_transform_request(opts: object): Promise<any>;
Name | Type | Description |
---|---|---|
opts |
object |
- |
opts.K? |
string | boolean |
Metadata routing for K parameter in transform . |
opts.copy? |
string | boolean |
Metadata routing for copy parameter in transform . |
Promise
<any
>
Defined in: generated/preprocessing/KernelCenterer.ts:364
Center kernel matrix.
transform(opts: object): Promise<ArrayLike[]>;
Name | Type | Description |
---|---|---|
opts |
object |
- |
opts.K? |
ArrayLike [] |
Kernel matrix. |
opts.copy? |
boolean |
Set to false to perform inplace computation. Default Value true |
Promise
<ArrayLike
[]>
Defined in: generated/preprocessing/KernelCenterer.ts:404
boolean
=false
Defined in: generated/preprocessing/KernelCenterer.ts:21
boolean
=false
Defined in: generated/preprocessing/KernelCenterer.ts:20
PythonBridge
Defined in: generated/preprocessing/KernelCenterer.ts:19
string
Defined in: generated/preprocessing/KernelCenterer.ts:16
any
Defined in: generated/preprocessing/KernelCenterer.ts:17
py(): PythonBridge;
PythonBridge
Defined in: generated/preprocessing/KernelCenterer.ts:48
py(pythonBridge: PythonBridge): void;
Name | Type |
---|---|
pythonBridge |
PythonBridge |
void
Defined in: generated/preprocessing/KernelCenterer.ts:52