verticapy.machine_learning.memmodel.decomposition.SVD.transform#
- SVD.transform(X: list | ndarray) ndarray #
Transforms and applies the
SVD
model to the input matrix.Parameters#
- X: ArrayLike
The data on which to make the transformation.
Returns#
- numpy.array
Transformed values.
Examples#
Import the required module.
from verticapy.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) Out[6]: array([[2.7 , 0.83333333]])
Note
Refer to
SVD
for more information about the different methods and usages.