Loading...

vastorbit.machine_learning.memmodel.decomposition.SVD.transform

SVD.transform(X: Annotated[list | ndarray, 'Array Like Structure']) ndarray

Transforms and applies the SVD model to the input matrix.

Parameters:

X (ArrayLike) – The data on which to make the transformation.

Returns:

Transformed values.

Return type:

numpy.array

Examples

Import the required module.

from vastorbit.machine_learning.memmodel.decomposition import SVD

We will use the following attributes:

vectors = [
    [0.4, 0.5],
    [0.3, 0.2],
]
values = [0.1, 0.3]

Let’s create a model.

model_svd = SVD(vectors, values)

Create a dataset.

data = [[0.3, 0.5]]

Transform the data.

model_svd.transform(data)

Note

Refer to SVD for more information about the different methods and usages.