Class: Google::Apis::MlV1::GoogleCloudMlV1ParameterSpec
- Inherits:
-
Object
- Object
- Google::Apis::MlV1::GoogleCloudMlV1ParameterSpec
- 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
-
#categorical_values ⇒ Array<String>
Required if type is
CATEGORICAL. -
#discrete_values ⇒ Array<Float>
Required if type is
DISCRETE. -
#max_value ⇒ Float
Required if typeis
DOUBLEorINTEGER. -
#min_value ⇒ Float
Required if type is
DOUBLEorINTEGER. -
#parameter_name ⇒ String
Required.
-
#scale_type ⇒ String
Optional.
-
#type ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudMlV1ParameterSpec
constructor
A new instance of GoogleCloudMlV1ParameterSpec.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ GoogleCloudMlV1ParameterSpec
Returns a new instance of GoogleCloudMlV1ParameterSpec
1430 1431 1432 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1430 def initialize(**args) update!(**args) end |
Instance Attribute Details
#categorical_values ⇒ Array<String>
Required if type is CATEGORICAL. The list of possible categories.
Corresponds to the JSON property categoricalValues
1422 1423 1424 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1422 def categorical_values @categorical_values end |
#discrete_values ⇒ Array<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
1397 1398 1399 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1397 def discrete_values @discrete_values end |
#max_value ⇒ Float
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
1412 1413 1414 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1412 def max_value @max_value end |
#min_value ⇒ Float
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
1388 1389 1390 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1388 def min_value @min_value end |
#parameter_name ⇒ String
Required. The parameter name must be unique amongst all ParameterConfigs in
a HyperparameterSpec message. E.g., "learning_rate".
Corresponds to the JSON property parameterName
1428 1429 1430 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1428 def parameter_name @parameter_name end |
#scale_type ⇒ String
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
1405 1406 1407 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1405 def scale_type @scale_type end |
#type ⇒ String
Required. The type of the parameter.
Corresponds to the JSON property type
1417 1418 1419 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1417 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1435 1436 1437 1438 1439 1440 1441 1442 1443 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1435 def update!(**args) @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) @categorical_values = args[:categorical_values] if args.key?(:categorical_values) @parameter_name = args[:parameter_name] if args.key?(:parameter_name) end |