Loading...

verticapy.machine_learning.vertica.decomposition.PCA.import_models

static PCA.import_models(path: str, schema: str | None = None, kind: Literal['pmml', 'vertica', 'vertica_models', 'tensorflow', 'tf', None] | None = None) bool

Imports machine learning models.

Parameters

path: str

Absolute path of an output directory to store the exported models.

Warning

This function operates solely on the server side and is not accessible locally. The path provided should match the location where the file(s) will be exported on the server.

schema: str, optional

Schema name.

kind: str, optional
One of the following:
  • pmml

  • vertica

  • tensorflow

Returns

bool

True if the model was successfully imported.

Examples

Let’s consider we’ve fitted a Vertica model named ‘my_model’. We want to import it in the ‘my_schema’ schema.

You can import it easily:

from verticapy.machine_learning.vertica.base import VerticaModel

VerticaModel.import_models(
    path = 'server_location'
    schema = 'my_schema',
    kind = 'pmml', # Pick up the import type.
)

Warning

This function operates solely on the server side and is not accessible locally.