Loading...

vastorbit.machine_learning.memmodel.decomposition.SVD.transform_sql

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

Transforms and returns the SQL needed to deploy the SVD model.

Parameters:

X (ArrayLike) – The names or values of the input predictors.

Returns:

SQL code.

Return type:

list

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)

Let’s use the following column names:

cnames = ['col1', 'col2']

Get the SQL code needed to deploy the model.

model_svd.transform_sql(cnames)

Note

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