Class: Google::Apis::MlV1::GoogleCloudMlV1ParameterSpec

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/ml_v1/classes.rb,
generated/google/apis/ml_v1/representations.rb,
generated/google/apis/ml_v1/representations.rb

Overview

Represents a single hyperparameter to optimize.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ GoogleCloudMlV1ParameterSpec

Returns a new instance of GoogleCloudMlV1ParameterSpec



741
742
743
# File 'generated/google/apis/ml_v1/classes.rb', line 741

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#categorical_valuesArray<String>

Required if type is CATEGORICAL. The list of possible categories. Corresponds to the JSON property categoricalValues

Returns:

  • (Array<String>)


697
698
699
# File 'generated/google/apis/ml_v1/classes.rb', line 697

def categorical_values
  @categorical_values
end

#discrete_valuesArray<Float>

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

Returns:

  • (Array<Float>)


719
720
721
# File 'generated/google/apis/ml_v1/classes.rb', line 719

def discrete_values
  @discrete_values
end

#max_valueFloat

Required if typeis 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

Returns:

  • (Float)


734
735
736
# File 'generated/google/apis/ml_v1/classes.rb', line 734

def max_value
  @max_value
end

#min_valueFloat

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

Returns:

  • (Float)


710
711
712
# File 'generated/google/apis/ml_v1/classes.rb', line 710

def min_value
  @min_value
end

#parameter_nameString

Required. The parameter name must be unique amongst all ParameterConfigs in a HyperparameterSpec message. E.g., "learning_rate". Corresponds to the JSON property parameterName

Returns:

  • (String)


703
704
705
# File 'generated/google/apis/ml_v1/classes.rb', line 703

def parameter_name
  @parameter_name
end

#scale_typeString

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

Returns:

  • (String)


727
728
729
# File 'generated/google/apis/ml_v1/classes.rb', line 727

def scale_type
  @scale_type
end

#typeString

Required. The type of the parameter. Corresponds to the JSON property type

Returns:

  • (String)


739
740
741
# File 'generated/google/apis/ml_v1/classes.rb', line 739

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



746
747
748
749
750
751
752
753
754
# File 'generated/google/apis/ml_v1/classes.rb', line 746

def update!(**args)
  @categorical_values = args[:categorical_values] if args.key?(:categorical_values)
  @parameter_name = args[:parameter_name] if args.key?(:parameter_name)
  @min_value = args[:min_value] if args.key?(:min_value)
  @discrete_values = args[:discrete_values] if args.key?(:discrete_values)
  @scale_type = args[:scale_type] if args.key?(:scale_type)
  @max_value = args[:max_value] if args.key?(:max_value)
  @type = args[:type] if args.key?(:type)
end