class Google::Apis::MlV1::GoogleCloudMlV1ParameterSpec

Represents a single hyperparameter to optimize.

Attributes

categorical_values[RW]

Required if type is `CATEGORICAL`. The list of possible categories. Corresponds to the JSON property `categoricalValues` @return [Array<String>]

discrete_values[RW]

Required if type is `DISCRETE`. A list of feasible points. The list should be in strictly increasing order. For instance, this parameter might have possible settings of 1.5, 2.5, and 4.0. This list should not contain more than 1,000 values. Corresponds to the JSON property `discreteValues` @return [Array<Float>]

max_value[RW]

Required if type is `DOUBLE` or `INTEGER`. This field should be unset if type is `CATEGORICAL`. This value should be integers if type is `INTEGER`. Corresponds to the JSON property `maxValue` @return [Float]

min_value[RW]

Required if type is `DOUBLE` or `INTEGER`. This field should be unset if type is `CATEGORICAL`. This value should be integers if type is INTEGER. Corresponds to the JSON property `minValue` @return [Float]

parameter_name[RW]

Required. The parameter name must be unique amongst all ParameterConfigs in a HyperparameterSpec message. E.g., “learning_rate”. Corresponds to the JSON property `parameterName` @return [String]

scale_type[RW]

Optional. How the parameter should be scaled to the hypercube. Leave unset for categorical parameters. Some kind of scaling is strongly recommended for real or integral parameters (e.g., `UNIT_LINEAR_SCALE`). Corresponds to the JSON property `scaleType` @return [String]

type[RW]

Required. The type of the parameter. Corresponds to the JSON property `type` @return [String]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/ml_v1/classes.rb, line 1947
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/ml_v1/classes.rb, line 1952
def update!(**args)
  @categorical_values = args[:categorical_values] if args.key?(:categorical_values)
  @discrete_values = args[:discrete_values] if args.key?(:discrete_values)
  @max_value = args[:max_value] if args.key?(:max_value)
  @min_value = args[:min_value] if args.key?(:min_value)
  @parameter_name = args[:parameter_name] if args.key?(:parameter_name)
  @scale_type = args[:scale_type] if args.key?(:scale_type)
  @type = args[:type] if args.key?(:type)
end