Class Model (3.39.0)

Model(mapping=None,*,ignore_unknown_fields=False,**kwargs)

Attributes

NameDescription
etagstr
Output only. A hash of this resource.
model_referencegoogle.cloud.bigquery_v2.types.ModelReference
Required. Unique identifier for this model.
creation_timeint
Output only. The time when this model was created, in millisecs since the epoch.
last_modified_timeint
Output only. The time when this model was last modified, in millisecs since the epoch.
descriptionstr
Optional. A user-friendly description of this model.
friendly_namestr
Optional. A descriptive name for this model.
labelsMapping[str, str]
The labels associated with this model. You can use these to organize and group your models. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key.
expiration_timeint
Optional. The time when this model expires, in milliseconds since the epoch. If not present, the model will persist indefinitely. Expired models will be deleted and their storage reclaimed. The defaultTableExpirationMs property of the encapsulating dataset can be used to set a default expirationTime on newly created models.
locationstr
Output only. The geographic location where the model resides. This value is inherited from the dataset.
encryption_configurationgoogle.cloud.bigquery_v2.types.EncryptionConfiguration
Custom encryption configuration (e.g., Cloud KMS keys). This shows the encryption configuration of the model data while stored in BigQuery storage. This field can be used with PatchModel to update encryption key for an already encrypted model.
model_typegoogle.cloud.bigquery_v2.types.Model.ModelType
Output only. Type of the model resource.
training_runsSequence[google.cloud.bigquery_v2.types.Model.TrainingRun]
Output only. Information for all training runs in increasing order of start_time.
feature_columnsSequence[google.cloud.bigquery_v2.types.StandardSqlField]
Output only. Input feature columns that were used to train this model.
label_columnsSequence[google.cloud.bigquery_v2.types.StandardSqlField]
Output only. Label columns that were used to train this model. The output of the model will have apredicted_ prefix to these columns.
best_trial_idint
The best trial_id across all training runs.

Classes

AggregateClassificationMetrics

AggregateClassificationMetrics(mapping=None,*,ignore_unknown_fields=False,**kwargs)

Aggregate metrics for classification/classifier models. Formulti-class models, the metrics are either macro-averaged ormicro-averaged. When macro-averaged, the metrics are calculatedfor each label and then an unweighted average is taken of thosevalues. When micro-averaged, the metric is calculated globallyby counting the total number of correctly predicted rows.

ArimaFittingMetrics

ArimaFittingMetrics(mapping=None,*,ignore_unknown_fields=False,**kwargs)

ARIMA model fitting metrics.

ArimaForecastingMetrics

ArimaForecastingMetrics(mapping=None,*,ignore_unknown_fields=False,**kwargs)

Model evaluation metrics for ARIMA forecasting models.

ArimaOrder

ArimaOrder(mapping=None,*,ignore_unknown_fields=False,**kwargs)

Arima order, can be used for both non-seasonal and seasonalparts.

BinaryClassificationMetrics

BinaryClassificationMetrics(mapping=None,*,ignore_unknown_fields=False,**kwargs)

Evaluation metrics for binary classification/classifiermodels.

ClusteringMetrics

ClusteringMetrics(mapping=None,*,ignore_unknown_fields=False,**kwargs)

Evaluation metrics for clustering models.

DataFrequency

DataFrequency(value)

Type of supported data frequency for time series forecastingmodels.

DataSplitMethod

DataSplitMethod(value)

Indicates the method to split input data into multipletables.

DataSplitResult

DataSplitResult(mapping=None,*,ignore_unknown_fields=False,**kwargs)

Data split result. This contains references to the trainingand evaluation data tables that were used to train the model.

DistanceType

DistanceType(value)

Distance metric used to compute the distance between twopoints.

EvaluationMetrics

EvaluationMetrics(mapping=None,*,ignore_unknown_fields=False,**kwargs)

FeedbackType

FeedbackType(value)

Indicates the training algorithm to use for matrixfactorization models.

GlobalExplanation

GlobalExplanation(mapping=None,*,ignore_unknown_fields=False,**kwargs)

Global explanations containing the top most importantfeatures after training.

HolidayRegion

HolidayRegion(value)

Type of supported holiday regions for time series forecastingmodels.

KmeansEnums

KmeansEnums(mapping=None,*,ignore_unknown_fields=False,**kwargs)

API documentation forbigquery_v2.types.Model.KmeansEnums class.

LabelsEntry

LabelsEntry(mapping=None,*,ignore_unknown_fields=False,**kwargs)

The abstract base class for a message.

Parameters
NameDescription
kwargsdict

Keys and values corresponding to the fields of the message.

mappingUnion[dict,.Message]

A dictionary or message to be used to determine the values for this message.

ignore_unknown_fieldsOptional(bool)

If True, do not raise errors for unknown fields. Only applied ifmapping is a mapping type or there are keyword parameters.

LearnRateStrategy

LearnRateStrategy(value)

Indicates the learning rate optimization strategy to use.

LossType

LossType(value)

Loss metric to evaluate model training performance.

ModelType

ModelType(value)

Indicates the type of the Model.

MultiClassClassificationMetrics

MultiClassClassificationMetrics(mapping=None,*,ignore_unknown_fields=False,**kwargs)

Evaluation metrics for multi-class classification/classifiermodels.

OptimizationStrategy

OptimizationStrategy(value)

Indicates the optimization strategy used for training.

RankingMetrics

RankingMetrics(mapping=None,*,ignore_unknown_fields=False,**kwargs)

Evaluation metrics used by weighted-ALS models specified byfeedback_type=implicit.

RegressionMetrics

RegressionMetrics(mapping=None,*,ignore_unknown_fields=False,**kwargs)

Evaluation metrics for regression and explicit feedback typematrix factorization models.

SeasonalPeriod

SeasonalPeriod(mapping=None,*,ignore_unknown_fields=False,**kwargs)

API documentation forbigquery_v2.types.Model.SeasonalPeriod class.

TrainingRun

TrainingRun(mapping=None,*,ignore_unknown_fields=False,**kwargs)

Information about a single training query run for the model.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-16 UTC.