Class: PLSSVD

Partial Least Square SVD.

This transformer simply performs a SVD on the cross-covariance matrix X'Y. It is able to project both the training data X and the targets Y. The training data X is projected on the left singular vectors, while the targets are projected on the right singular vectors.

Read more in the User Guide.

Python Reference

Constructors

new PLSSVD()

new PLSSVD(opts?): PLSSVD

Parameters

ParameterTypeDescription
opts?object-
opts.copy?booleanWhether to copy X and Y in fit before applying centering, and potentially scaling. If false, these operations will be done inplace, modifying both arrays.
opts.n_components?numberThe number of components to keep. Should be in \[1, min(n_samples, n_features, n_targets)\].
opts.scale?booleanWhether to scale X and Y.

Returns PLSSVD

Defined in generated/cross_decomposition/PLSSVD.ts:25

Properties

PropertyTypeDefault valueDefined in
_isDisposedbooleanfalsegenerated/cross_decomposition/PLSSVD.ts:23
_isInitializedbooleanfalsegenerated/cross_decomposition/PLSSVD.ts:22
_pyPythonBridgeundefinedgenerated/cross_decomposition/PLSSVD.ts:21
idstringundefinedgenerated/cross_decomposition/PLSSVD.ts:18
optsanyundefinedgenerated/cross_decomposition/PLSSVD.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/cross_decomposition/PLSSVD.ts:411


n_features_in_

Get Signature

get n_features_in_(): Promise<number>

Number of features seen during fit.

Returns Promise<number>

Defined in generated/cross_decomposition/PLSSVD.ts:388


py

Get Signature

get py(): PythonBridge

Returns PythonBridge

Set Signature

set py(pythonBridge): void

Parameters

ParameterType
pythonBridgePythonBridge

Returns void

Defined in generated/cross_decomposition/PLSSVD.ts:51


x_weights_

Get Signature

get x_weights_(): Promise<ArrayLike[]>

The left singular vectors of the SVD of the cross-covariance matrix. Used to project X in transform.

Returns Promise<ArrayLike[]>

Defined in generated/cross_decomposition/PLSSVD.ts:342


y_weights_

Get Signature

get y_weights_(): Promise<any>

The right singular vectors of the SVD of the cross-covariance matrix. Used to project X in transform.

Returns Promise<any>

Defined in generated/cross_decomposition/PLSSVD.ts:365

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/cross_decomposition/PLSSVD.ts:102


fit()

fit(opts): Promise<any>

Fit model to data.

Parameters

ParameterTypeDescription
optsobject-
opts.X?ArrayLike[]Training samples.
opts.y?ArrayLikeTargets.
opts.Y?ArrayLikeTargets.

Returns Promise<any>

Defined in generated/cross_decomposition/PLSSVD.ts:119


fit_transform()

fit_transform(opts): Promise<ArrayLike>

Learn and apply the dimensionality reduction.

Parameters

ParameterTypeDescription
optsobject-
opts.X?ArrayLike[]Training samples.
opts.y?ArrayLikeTargets.

Returns Promise<ArrayLike>

Defined in generated/cross_decomposition/PLSSVD.ts:161


get_feature_names_out()

get_feature_names_out(opts): Promise<any>

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"\].

Parameters

ParameterTypeDescription
optsobject-
opts.input_features?anyOnly used to validate feature names with the names seen in fit.

Returns Promise<any>

Defined in generated/cross_decomposition/PLSSVD.ts:200


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/cross_decomposition/PLSSVD.ts:234


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/cross_decomposition/PLSSVD.ts:64


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/cross_decomposition/PLSSVD.ts:268


transform()

transform(opts): Promise<ArrayLike>

Apply the dimensionality reduction.

Parameters

ParameterTypeDescription
optsobject-
opts.X?ArrayLike[]Samples to be transformed.
opts.y?ArrayLikeTargets.
opts.Y?ArrayLikeTargets.

Returns Promise<ArrayLike>

Defined in generated/cross_decomposition/PLSSVD.ts:300