Train a classifier
Create a job that trains a text classifier on a dataset. Only supported for datasets on Snowflake data planes.
The training data is referenced by dataset_id; the backing table is resolved server-side. Every column
reference in the request (label_column, id_column, and each feature’s field_path) is validated against the
dataset’s schema before the job is created.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Id of the dataset to train on. The dataset must be active on a Snowflake data plane.
Features to train on. Feature names must be unique.
1Column holding the training labels. Either a plain column name (e.g. category) or a path into a variant
column (e.g. data['category']). The referenced column must exist in the dataset's schema, spelled exactly
as it appears there.
Name under which the trained model is saved in the model registry. Must consist of only alphanumeric characters and underscores.
Whether the training output should include debug information. Defaults to false.
Column used to track individual rows in training outputs. Same format as label_column. Defaults to ID.
Classifier configuration, e.g. {"type": "logistic_regression", "C": 1.0}. Supported types:
logistic_regression, random_forest, gradient_boosting, svm, naive_bayes. Defaults to logistic
regression.
Version under which the trained model is saved in the model registry.
Random seed for reproducibility.
Whether the trained model should be saved to the model registry. Defaults to true.
Whether to use a stratified train/test split. Defaults to true.
Tags attached to the created job.
Fraction of the data held out as the test set. Defaults to 0.2.
0 <= x <= 1Response
OK
Id of the created training job. Poll the jobs API for status and results.

