Class: Google::Cloud::DiscoveryEngine::V1::Engine::MediaRecommendationEngineConfig

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/discoveryengine/v1/engine.rb

Overview

Additional config specs for a Media Recommendation engine.

Defined Under Namespace

Modules: TrainingState Classes: EngineFeaturesConfig, MostPopularFeatureConfig, OptimizationObjectiveConfig, RecommendedForYouFeatureConfig

Instance Attribute Summary collapse

Instance Attribute Details

#engine_features_config::Google::Cloud::DiscoveryEngine::V1::Engine::MediaRecommendationEngineConfig::EngineFeaturesConfig

Returns Optional. Additional engine features config.



187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
# File 'proto_docs/google/cloud/discoveryengine/v1/engine.rb', line 187

class MediaRecommendationEngineConfig
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Custom threshold for `cvr` optimization_objective.
  # @!attribute [rw] target_field
  #   @return [::String]
  #     Required. The name of the field to target. Currently supported
  #     values: `watch-percentage`, `watch-time`.
  # @!attribute [rw] target_field_value_float
  #   @return [::Float]
  #     Required. The threshold to be applied to the target (e.g., 0.5).
  class OptimizationObjectiveConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # More feature configs of the selected engine type.
  # @!attribute [rw] recommended_for_you_config
  #   @return [::Google::Cloud::DiscoveryEngine::V1::Engine::MediaRecommendationEngineConfig::RecommendedForYouFeatureConfig]
  #     Recommended for you engine feature config.
  #
  #     Note: The following fields are mutually exclusive: `recommended_for_you_config`, `most_popular_config`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] most_popular_config
  #   @return [::Google::Cloud::DiscoveryEngine::V1::Engine::MediaRecommendationEngineConfig::MostPopularFeatureConfig]
  #     Most popular engine feature config.
  #
  #     Note: The following fields are mutually exclusive: `most_popular_config`, `recommended_for_you_config`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  class EngineFeaturesConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Additional feature configurations for creating a `recommended-for-you`
  # engine.
  # @!attribute [rw] context_event_type
  #   @return [::String]
  #     The type of event with which the engine is queried at prediction time.
  #     If set to `generic`, only `view-item`, `media-play`,and
  #     `media-complete` will be used as `context-event` in engine training. If
  #     set to `view-home-page`, `view-home-page` will also be used as
  #     `context-events` in addition to `view-item`, `media-play`, and
  #     `media-complete`. Currently supported for the `recommended-for-you`
  #     engine. Currently supported values: `view-home-page`, `generic`.
  class RecommendedForYouFeatureConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Feature configurations that are required for creating a Most Popular
  # engine.
  # @!attribute [rw] time_window_days
  #   @return [::Integer]
  #     The time window of which the engine is queried at training and
  #     prediction time. Positive integers only. The value translates to the
  #     last X days of events. Currently required for the `most-popular-items`
  #     engine.
  class MostPopularFeatureConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The training state of the engine.
  module TrainingState
    # Unspecified training state.
    TRAINING_STATE_UNSPECIFIED = 0

    # The engine training is paused.
    PAUSED = 1

    # The engine is training.
    TRAINING = 2
  end
end

#optimization_objective::String

Returns The optimization objective. e.g., cvr.

This field together with optimization_objective describe engine metadata to use to control engine training and serving.

Currently supported values: ctr, cvr.

If not specified, we choose default based on engine type. Default depends on type of recommendation:

recommended-for-you => ctr

others-you-may-like => ctr.

Returns:

  • (::String)

    The optimization objective. e.g., cvr.

    This field together with optimization_objective describe engine metadata to use to control engine training and serving.

    Currently supported values: ctr, cvr.

    If not specified, we choose default based on engine type. Default depends on type of recommendation:

    recommended-for-you => ctr

    others-you-may-like => ctr



187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
# File 'proto_docs/google/cloud/discoveryengine/v1/engine.rb', line 187

class MediaRecommendationEngineConfig
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Custom threshold for `cvr` optimization_objective.
  # @!attribute [rw] target_field
  #   @return [::String]
  #     Required. The name of the field to target. Currently supported
  #     values: `watch-percentage`, `watch-time`.
  # @!attribute [rw] target_field_value_float
  #   @return [::Float]
  #     Required. The threshold to be applied to the target (e.g., 0.5).
  class OptimizationObjectiveConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # More feature configs of the selected engine type.
  # @!attribute [rw] recommended_for_you_config
  #   @return [::Google::Cloud::DiscoveryEngine::V1::Engine::MediaRecommendationEngineConfig::RecommendedForYouFeatureConfig]
  #     Recommended for you engine feature config.
  #
  #     Note: The following fields are mutually exclusive: `recommended_for_you_config`, `most_popular_config`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] most_popular_config
  #   @return [::Google::Cloud::DiscoveryEngine::V1::Engine::MediaRecommendationEngineConfig::MostPopularFeatureConfig]
  #     Most popular engine feature config.
  #
  #     Note: The following fields are mutually exclusive: `most_popular_config`, `recommended_for_you_config`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  class EngineFeaturesConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Additional feature configurations for creating a `recommended-for-you`
  # engine.
  # @!attribute [rw] context_event_type
  #   @return [::String]
  #     The type of event with which the engine is queried at prediction time.
  #     If set to `generic`, only `view-item`, `media-play`,and
  #     `media-complete` will be used as `context-event` in engine training. If
  #     set to `view-home-page`, `view-home-page` will also be used as
  #     `context-events` in addition to `view-item`, `media-play`, and
  #     `media-complete`. Currently supported for the `recommended-for-you`
  #     engine. Currently supported values: `view-home-page`, `generic`.
  class RecommendedForYouFeatureConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Feature configurations that are required for creating a Most Popular
  # engine.
  # @!attribute [rw] time_window_days
  #   @return [::Integer]
  #     The time window of which the engine is queried at training and
  #     prediction time. Positive integers only. The value translates to the
  #     last X days of events. Currently required for the `most-popular-items`
  #     engine.
  class MostPopularFeatureConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The training state of the engine.
  module TrainingState
    # Unspecified training state.
    TRAINING_STATE_UNSPECIFIED = 0

    # The engine training is paused.
    PAUSED = 1

    # The engine is training.
    TRAINING = 2
  end
end

#optimization_objective_config::Google::Cloud::DiscoveryEngine::V1::Engine::MediaRecommendationEngineConfig::OptimizationObjectiveConfig

Returns Name and value of the custom threshold for cvr optimization_objective. For target_field watch-time, target_field_value must be an integer value indicating the media progress time in seconds between (0, 86400] (excludes 0, includes 86400) (e.g., 90). For target_field watch-percentage, the target_field_value must be a valid float value between (0, 1.0] (excludes 0, includes 1.0) (e.g., 0.5).

Returns:



187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
# File 'proto_docs/google/cloud/discoveryengine/v1/engine.rb', line 187

class MediaRecommendationEngineConfig
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Custom threshold for `cvr` optimization_objective.
  # @!attribute [rw] target_field
  #   @return [::String]
  #     Required. The name of the field to target. Currently supported
  #     values: `watch-percentage`, `watch-time`.
  # @!attribute [rw] target_field_value_float
  #   @return [::Float]
  #     Required. The threshold to be applied to the target (e.g., 0.5).
  class OptimizationObjectiveConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # More feature configs of the selected engine type.
  # @!attribute [rw] recommended_for_you_config
  #   @return [::Google::Cloud::DiscoveryEngine::V1::Engine::MediaRecommendationEngineConfig::RecommendedForYouFeatureConfig]
  #     Recommended for you engine feature config.
  #
  #     Note: The following fields are mutually exclusive: `recommended_for_you_config`, `most_popular_config`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] most_popular_config
  #   @return [::Google::Cloud::DiscoveryEngine::V1::Engine::MediaRecommendationEngineConfig::MostPopularFeatureConfig]
  #     Most popular engine feature config.
  #
  #     Note: The following fields are mutually exclusive: `most_popular_config`, `recommended_for_you_config`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  class EngineFeaturesConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Additional feature configurations for creating a `recommended-for-you`
  # engine.
  # @!attribute [rw] context_event_type
  #   @return [::String]
  #     The type of event with which the engine is queried at prediction time.
  #     If set to `generic`, only `view-item`, `media-play`,and
  #     `media-complete` will be used as `context-event` in engine training. If
  #     set to `view-home-page`, `view-home-page` will also be used as
  #     `context-events` in addition to `view-item`, `media-play`, and
  #     `media-complete`. Currently supported for the `recommended-for-you`
  #     engine. Currently supported values: `view-home-page`, `generic`.
  class RecommendedForYouFeatureConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Feature configurations that are required for creating a Most Popular
  # engine.
  # @!attribute [rw] time_window_days
  #   @return [::Integer]
  #     The time window of which the engine is queried at training and
  #     prediction time. Positive integers only. The value translates to the
  #     last X days of events. Currently required for the `most-popular-items`
  #     engine.
  class MostPopularFeatureConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The training state of the engine.
  module TrainingState
    # Unspecified training state.
    TRAINING_STATE_UNSPECIFIED = 0

    # The engine training is paused.
    PAUSED = 1

    # The engine is training.
    TRAINING = 2
  end
end

#training_state::Google::Cloud::DiscoveryEngine::V1::Engine::MediaRecommendationEngineConfig::TrainingState

Returns The training state that the engine 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 engine in order to control cost. If not specified: the default value for CreateEngine method is TRAINING. The default value for UpdateEngine method is to keep the state the same as before.

Returns:

  • (::Google::Cloud::DiscoveryEngine::V1::Engine::MediaRecommendationEngineConfig::TrainingState)

    The training state that the engine 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 engine in order to control cost. If not specified: the default value for CreateEngine method is TRAINING. The default value for UpdateEngine method is to keep the state the same as before.



187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
# File 'proto_docs/google/cloud/discoveryengine/v1/engine.rb', line 187

class MediaRecommendationEngineConfig
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Custom threshold for `cvr` optimization_objective.
  # @!attribute [rw] target_field
  #   @return [::String]
  #     Required. The name of the field to target. Currently supported
  #     values: `watch-percentage`, `watch-time`.
  # @!attribute [rw] target_field_value_float
  #   @return [::Float]
  #     Required. The threshold to be applied to the target (e.g., 0.5).
  class OptimizationObjectiveConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # More feature configs of the selected engine type.
  # @!attribute [rw] recommended_for_you_config
  #   @return [::Google::Cloud::DiscoveryEngine::V1::Engine::MediaRecommendationEngineConfig::RecommendedForYouFeatureConfig]
  #     Recommended for you engine feature config.
  #
  #     Note: The following fields are mutually exclusive: `recommended_for_you_config`, `most_popular_config`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] most_popular_config
  #   @return [::Google::Cloud::DiscoveryEngine::V1::Engine::MediaRecommendationEngineConfig::MostPopularFeatureConfig]
  #     Most popular engine feature config.
  #
  #     Note: The following fields are mutually exclusive: `most_popular_config`, `recommended_for_you_config`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  class EngineFeaturesConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Additional feature configurations for creating a `recommended-for-you`
  # engine.
  # @!attribute [rw] context_event_type
  #   @return [::String]
  #     The type of event with which the engine is queried at prediction time.
  #     If set to `generic`, only `view-item`, `media-play`,and
  #     `media-complete` will be used as `context-event` in engine training. If
  #     set to `view-home-page`, `view-home-page` will also be used as
  #     `context-events` in addition to `view-item`, `media-play`, and
  #     `media-complete`. Currently supported for the `recommended-for-you`
  #     engine. Currently supported values: `view-home-page`, `generic`.
  class RecommendedForYouFeatureConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Feature configurations that are required for creating a Most Popular
  # engine.
  # @!attribute [rw] time_window_days
  #   @return [::Integer]
  #     The time window of which the engine is queried at training and
  #     prediction time. Positive integers only. The value translates to the
  #     last X days of events. Currently required for the `most-popular-items`
  #     engine.
  class MostPopularFeatureConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The training state of the engine.
  module TrainingState
    # Unspecified training state.
    TRAINING_STATE_UNSPECIFIED = 0

    # The engine training is paused.
    PAUSED = 1

    # The engine is training.
    TRAINING = 2
  end
end

#type::String

Returns Required. The type of engine. e.g., recommended-for-you.

This field together with optimization_objective describe engine metadata to use to control engine training and serving.

Currently supported values: recommended-for-you, others-you-may-like, more-like-this, most-popular-items.

Returns:

  • (::String)

    Required. The type of engine. e.g., recommended-for-you.

    This field together with optimization_objective describe engine metadata to use to control engine training and serving.

    Currently supported values: recommended-for-you, others-you-may-like, more-like-this, most-popular-items.



187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
# File 'proto_docs/google/cloud/discoveryengine/v1/engine.rb', line 187

class MediaRecommendationEngineConfig
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Custom threshold for `cvr` optimization_objective.
  # @!attribute [rw] target_field
  #   @return [::String]
  #     Required. The name of the field to target. Currently supported
  #     values: `watch-percentage`, `watch-time`.
  # @!attribute [rw] target_field_value_float
  #   @return [::Float]
  #     Required. The threshold to be applied to the target (e.g., 0.5).
  class OptimizationObjectiveConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # More feature configs of the selected engine type.
  # @!attribute [rw] recommended_for_you_config
  #   @return [::Google::Cloud::DiscoveryEngine::V1::Engine::MediaRecommendationEngineConfig::RecommendedForYouFeatureConfig]
  #     Recommended for you engine feature config.
  #
  #     Note: The following fields are mutually exclusive: `recommended_for_you_config`, `most_popular_config`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] most_popular_config
  #   @return [::Google::Cloud::DiscoveryEngine::V1::Engine::MediaRecommendationEngineConfig::MostPopularFeatureConfig]
  #     Most popular engine feature config.
  #
  #     Note: The following fields are mutually exclusive: `most_popular_config`, `recommended_for_you_config`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  class EngineFeaturesConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Additional feature configurations for creating a `recommended-for-you`
  # engine.
  # @!attribute [rw] context_event_type
  #   @return [::String]
  #     The type of event with which the engine is queried at prediction time.
  #     If set to `generic`, only `view-item`, `media-play`,and
  #     `media-complete` will be used as `context-event` in engine training. If
  #     set to `view-home-page`, `view-home-page` will also be used as
  #     `context-events` in addition to `view-item`, `media-play`, and
  #     `media-complete`. Currently supported for the `recommended-for-you`
  #     engine. Currently supported values: `view-home-page`, `generic`.
  class RecommendedForYouFeatureConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Feature configurations that are required for creating a Most Popular
  # engine.
  # @!attribute [rw] time_window_days
  #   @return [::Integer]
  #     The time window of which the engine is queried at training and
  #     prediction time. Positive integers only. The value translates to the
  #     last X days of events. Currently required for the `most-popular-items`
  #     engine.
  class MostPopularFeatureConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The training state of the engine.
  module TrainingState
    # Unspecified training state.
    TRAINING_STATE_UNSPECIFIED = 0

    # The engine training is paused.
    PAUSED = 1

    # The engine is training.
    TRAINING = 2
  end
end