Class: Google::Apis::RetailV2::GoogleCloudRetailV2alphaModel
- Inherits:
-
Object
- Object
- Google::Apis::RetailV2::GoogleCloudRetailV2alphaModel
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/retail_v2/classes.rb,
lib/google/apis/retail_v2/representations.rb,
lib/google/apis/retail_v2/representations.rb
Overview
Metadata that describes the training and serving parameters of a Model. A Model can be associated with a ServingConfig and then queried through the Predict API.
Instance Attribute Summary collapse
-
#create_time ⇒ String
Output only.
-
#data_state ⇒ String
Output only.
-
#display_name ⇒ String
Required.
-
#filtering_option ⇒ String
Optional.
-
#last_tune_time ⇒ String
Output only.
-
#model_features_config ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2alphaModelModelFeaturesConfig
Additional model features config.
-
#name ⇒ String
Required.
-
#optimization_objective ⇒ String
Optional.
-
#page_optimization_config ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2alphaModelPageOptimizationConfig
The PageOptimizationConfig for model training.
-
#periodic_tuning_state ⇒ String
Optional.
-
#serving_config_lists ⇒ Array<Google::Apis::RetailV2::GoogleCloudRetailV2alphaModelServingConfigList>
Output only.
-
#serving_state ⇒ String
Output only.
-
#training_state ⇒ String
Optional.
-
#tuning_operation ⇒ String
Output only.
-
#type ⇒ String
Required.
-
#update_time ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudRetailV2alphaModel
constructor
A new instance of GoogleCloudRetailV2alphaModel.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudRetailV2alphaModel
Returns a new instance of GoogleCloudRetailV2alphaModel.
6823 6824 6825 |
# File 'lib/google/apis/retail_v2/classes.rb', line 6823 def initialize(**args) update!(**args) end |
Instance Attribute Details
#create_time ⇒ String
Output only. Timestamp the Recommendation Model was created at.
Corresponds to the JSON property createTime
6703 6704 6705 |
# File 'lib/google/apis/retail_v2/classes.rb', line 6703 def create_time @create_time end |
#data_state ⇒ String
Output only. The state of data requirements for this model: DATA_OK
and
DATA_ERROR
. Recommendation model cannot be trained if the data is in
DATA_ERROR
state. Recommendation model can have DATA_ERROR
state even if
serving state is ACTIVE
: models were trained successfully before, but cannot
be refreshed because model no longer has sufficient data for training.
Corresponds to the JSON property dataState
6712 6713 6714 |
# File 'lib/google/apis/retail_v2/classes.rb', line 6712 def data_state @data_state end |
#display_name ⇒ String
Required. The display name of the model. Should be human readable, used to
display Recommendation Models in the Retail Cloud Console Dashboard. UTF-8
encoded string with limit of 1024 characters.
Corresponds to the JSON property displayName
6719 6720 6721 |
# File 'lib/google/apis/retail_v2/classes.rb', line 6719 def display_name @display_name end |
#filtering_option ⇒ String
Optional. If RECOMMENDATIONS_FILTERING_ENABLED
, recommendation filtering by
attributes is enabled for the model.
Corresponds to the JSON property filteringOption
6725 6726 6727 |
# File 'lib/google/apis/retail_v2/classes.rb', line 6725 def filtering_option @filtering_option end |
#last_tune_time ⇒ String
Output only. The timestamp when the latest successful tune finished.
Corresponds to the JSON property lastTuneTime
6730 6731 6732 |
# File 'lib/google/apis/retail_v2/classes.rb', line 6730 def last_tune_time @last_tune_time end |
#model_features_config ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2alphaModelModelFeaturesConfig
Additional model features config.
Corresponds to the JSON property modelFeaturesConfig
6735 6736 6737 |
# File 'lib/google/apis/retail_v2/classes.rb', line 6735 def model_features_config @model_features_config end |
#name ⇒ String
Required. The fully qualified resource name of the model. Format: projects/
project_number/locations/
location_id/catalogs/
catalog_id/models/
model_id
catalog_id has char limit of 50. recommendation_model_id has char limit of
40.
Corresponds to the JSON property name
6743 6744 6745 |
# File 'lib/google/apis/retail_v2/classes.rb', line 6743 def name @name end |
#optimization_objective ⇒ String
Optional. The optimization objective e.g. cvr
. Currently supported values:
ctr
, cvr
, revenue-per-order
. If not specified, we choose default based on
model type. Default depends on type of recommendation: recommended-for-you
=>
ctr
others-you-may-like
=> ctr
frequently-bought-together
=>
revenue_per_order
This field together with optimization_objective describe
model metadata to use to control model training and serving. See https://cloud.
google.com/retail/docs/models for more details on what the model metadata
control and which combination of parameters are valid. For invalid
combinations of parameters (e.g. type = frequently-bought-together
and
optimization_objective = ctr
), you receive an error 400 if you try to create/
update a recommendation with this set of knobs.
Corresponds to the JSON property optimizationObjective
6758 6759 6760 |
# File 'lib/google/apis/retail_v2/classes.rb', line 6758 def optimization_objective @optimization_objective end |
#page_optimization_config ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2alphaModelPageOptimizationConfig
The PageOptimizationConfig for model training. This determines how many panels
to optimize for, and which serving configs to consider for each panel. The
purpose of this model is to optimize which ServingConfig to show on which
panels in way that optimizes the visitors shopping journey.
Corresponds to the JSON property pageOptimizationConfig
6766 6767 6768 |
# File 'lib/google/apis/retail_v2/classes.rb', line 6766 def page_optimization_config @page_optimization_config end |
#periodic_tuning_state ⇒ String
Optional. The state of periodic tuning. The period we use is 3 months - to do
a one-off tune earlier use the TuneModel
method. Default value is
PERIODIC_TUNING_ENABLED
.
Corresponds to the JSON property periodicTuningState
6773 6774 6775 |
# File 'lib/google/apis/retail_v2/classes.rb', line 6773 def periodic_tuning_state @periodic_tuning_state end |
#serving_config_lists ⇒ Array<Google::Apis::RetailV2::GoogleCloudRetailV2alphaModelServingConfigList>
Output only. The list of valid serving configs associated with the
PageOptimizationConfig.
Corresponds to the JSON property servingConfigLists
6779 6780 6781 |
# File 'lib/google/apis/retail_v2/classes.rb', line 6779 def serving_config_lists @serving_config_lists end |
#serving_state ⇒ String
Output only. The serving state of the model: ACTIVE
, NOT_ACTIVE
.
Corresponds to the JSON property servingState
6784 6785 6786 |
# File 'lib/google/apis/retail_v2/classes.rb', line 6784 def serving_state @serving_state end |
#training_state ⇒ String
Optional. The training state that the model is in (e.g. TRAINING
or PAUSED
)
. Since part of the cost of running the service is frequency of training -
this can be used to determine when to train model in order to control cost. If
not specified: the default value for CreateModel
method is TRAINING
. The
default value for UpdateModel
method is to keep the state the same as before.
Corresponds to the JSON property trainingState
6793 6794 6795 |
# File 'lib/google/apis/retail_v2/classes.rb', line 6793 def training_state @training_state end |
#tuning_operation ⇒ String
Output only. The tune operation associated with the model. Can be used to
determine if there is an ongoing tune for this recommendation. Empty field
implies no tune is goig on.
Corresponds to the JSON property tuningOperation
6800 6801 6802 |
# File 'lib/google/apis/retail_v2/classes.rb', line 6800 def tuning_operation @tuning_operation end |
#type ⇒ String
Required. The type of model e.g. home-page
. Currently supported values:
recommended-for-you
, others-you-may-like
, frequently-bought-together
,
page-optimization
, similar-items
, buy-it-again
, on-sale-items
, and
recently-viewed
(readonly value). This field together with
optimization_objective describe model metadata to use to control model
training and serving. See https://cloud.google.com/retail/docs/models for more
details on what the model metadata control and which combination of parameters
are valid. For invalid combinations of parameters (e.g. type = frequently-
bought-together
and optimization_objective = ctr
), you receive an error 400
if you try to create/update a recommendation with this set of knobs.
Corresponds to the JSON property type
6814 6815 6816 |
# File 'lib/google/apis/retail_v2/classes.rb', line 6814 def type @type end |
#update_time ⇒ String
Output only. Timestamp the Recommendation Model was last updated. E.g. if a
Recommendation Model was paused - this would be the time the pause was
initiated.
Corresponds to the JSON property updateTime
6821 6822 6823 |
# File 'lib/google/apis/retail_v2/classes.rb', line 6821 def update_time @update_time end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 |
# File 'lib/google/apis/retail_v2/classes.rb', line 6828 def update!(**args) @create_time = args[:create_time] if args.key?(:create_time) @data_state = args[:data_state] if args.key?(:data_state) @display_name = args[:display_name] if args.key?(:display_name) @filtering_option = args[:filtering_option] if args.key?(:filtering_option) @last_tune_time = args[:last_tune_time] if args.key?(:last_tune_time) @model_features_config = args[:model_features_config] if args.key?(:model_features_config) @name = args[:name] if args.key?(:name) @optimization_objective = args[:optimization_objective] if args.key?(:optimization_objective) @page_optimization_config = args[:page_optimization_config] if args.key?(:page_optimization_config) @periodic_tuning_state = args[:periodic_tuning_state] if args.key?(:periodic_tuning_state) @serving_config_lists = args[:serving_config_lists] if args.key?(:serving_config_lists) @serving_state = args[:serving_state] if args.key?(:serving_state) @training_state = args[:training_state] if args.key?(:training_state) @tuning_operation = args[:tuning_operation] if args.key?(:tuning_operation) @type = args[:type] if args.key?(:type) @update_time = args[:update_time] if args.key?(:update_time) end |