verticapy.machine_learning.memmodel.decomposition.SVD.transform_sql#
- SVD.transform_sql(X: list | ndarray) 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#
- list
SQL code.
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)
Let’s use the following column names:
cnames = ['col1', 'col2']
Get the SQL code needed to deploy the model.
model_svd.transform_sql(cnames) Out[6]: ['col1 * 0.4 / 0.1 + col2 * 0.3 / 0.1', 'col1 * 0.5 / 0.3 + col2 * 0.2 / 0.3']
Note
Refer to
SVD
for more information about the different methods and usages.