Documentation
Classes
PLSSVD

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 (opens in a new tab)

Constructors

constructor()

Signature

new PLSSVD(opts?: object): PLSSVD;

Parameters

NameTypeDescription
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. Default Value true
opts.n_components?numberThe number of components to keep. Should be in \[1, min(n\_samples, n\_features, n\_targets)\]. Default Value 2
opts.scale?booleanWhether to scale X and Y. Default Value true

Returns

PLSSVD

Defined in: generated/cross_decomposition/PLSSVD.ts:25 (opens in a new tab)

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/cross_decomposition/PLSSVD.ts:105 (opens in a new tab)

fit()

Fit model to data.

Signature

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

Parameters

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

Returns

Promise<any>

Defined in: generated/cross_decomposition/PLSSVD.ts:122 (opens in a new tab)

fit_transform()

Learn and apply the dimensionality reduction.

Signature

fit_transform(opts: object): Promise<ArrayLike>;

Parameters

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

Returns

Promise<ArrayLike>

Defined in: generated/cross_decomposition/PLSSVD.ts:162 (opens in a new tab)

get_feature_names_out()

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

Signature

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

Parameters

NameTypeDescription
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:204 (opens in a new tab)

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

NameTypeDescription
optsobject-
opts.routing?anyA MetadataRequest encapsulating routing information.

Returns

Promise<any>

Defined in: generated/cross_decomposition/PLSSVD.ts:239 (opens in a new tab)

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

NameType
pyPythonBridge

Returns

Promise<void>

Defined in: generated/cross_decomposition/PLSSVD.ts:64 (opens in a new tab)

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

NameTypeDescription
optsobject-
opts.transform?"default" | "pandas"Configure output of transform and fit\_transform.

Returns

Promise<any>

Defined in: generated/cross_decomposition/PLSSVD.ts:274 (opens in a new tab)

transform()

Apply the dimensionality reduction.

Signature

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

Parameters

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

Returns

Promise<ArrayLike>

Defined in: generated/cross_decomposition/PLSSVD.ts:307 (opens in a new tab)

Properties

_isDisposed

boolean = false

Defined in: generated/cross_decomposition/PLSSVD.ts:23 (opens in a new tab)

_isInitialized

boolean = false

Defined in: generated/cross_decomposition/PLSSVD.ts:22 (opens in a new tab)

_py

PythonBridge

Defined in: generated/cross_decomposition/PLSSVD.ts:21 (opens in a new tab)

id

string

Defined in: generated/cross_decomposition/PLSSVD.ts:18 (opens in a new tab)

opts

any

Defined in: generated/cross_decomposition/PLSSVD.ts:19 (opens in a new tab)

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/cross_decomposition/PLSSVD.ts:416 (opens in a new tab)

n_features_in_

Number of features seen during fit.

Signature

n_features_in_(): Promise<number>;

Returns

Promise<number>

Defined in: generated/cross_decomposition/PLSSVD.ts:393 (opens in a new tab)

py

Signature

py(): PythonBridge;

Returns

PythonBridge

Defined in: generated/cross_decomposition/PLSSVD.ts:51 (opens in a new tab)

Signature

py(pythonBridge: PythonBridge): void;

Parameters

NameType
pythonBridgePythonBridge

Returns

void

Defined in: generated/cross_decomposition/PLSSVD.ts:55 (opens in a new tab)

x_weights_

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

Signature

x_weights_(): Promise<ArrayLike[]>;

Returns

Promise<ArrayLike[]>

Defined in: generated/cross_decomposition/PLSSVD.ts:347 (opens in a new tab)

y_weights_

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

Signature

y_weights_(): Promise<any>;

Returns

Promise<any>

Defined in: generated/cross_decomposition/PLSSVD.ts:370 (opens in a new tab)