Model.deploySQL

In [ ]:
Model.deploySQL(n_components: int = 0,
                cutoff: float = 1,
                key_columns: list = [],
                exclude_columns: list = [],
                X: list = [])

Returns the SQL statement needed to deploy the model.

Parameters

Name Type Optional Description
n_components
int
✓
Number of components to return. If set to 0, all the components will be deployed.
cutoff
float
✓
Specifies the minimum accumulated explained variance. Components are taken until the accumulated explained variance reaches this value.
key_columns
list
✓
Predictors used during the algorithm computation which will be deployed with the principal components.
exclude_columns
list
✓
Columns to exclude from the prediction.
X
list
✓
List of the columns used to deploy the model. If empty, the model predictors will be used.

Returns

str : the SQL statement needed to deploy the model.

Example

In [66]:
from verticapy.learn.decomposition import PCA
model = PCA(name = "public.pca_iris")
model.fit("public.iris", ["PetalLengthCm", "SepalLengthCm", "SepalWidthCm"])
display(model.deploySQL())
APPLY_PCA("PetalLengthCm", "SepalLengthCm", "SepalWidthCm" USING PARAMETERS model_name = 'public.pca_iris', match_by_pos = 'true', cutoff = 1)