Class: Google::Apis::MlV1::GoogleCloudMlV1HyperparameterSpec

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 set of hyperparameters 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) ⇒ GoogleCloudMlV1HyperparameterSpec

Returns a new instance of GoogleCloudMlV1HyperparameterSpec



1692
1693
1694
# File 'generated/google/apis/ml_v1/classes.rb', line 1692

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

Instance Attribute Details

#goalString

Required. The type of goal to use for tuning. Available types are MAXIMIZE and MINIMIZE. Defaults to MAXIMIZE. Corresponds to the JSON property goal

Returns:

  • (String)


1657
1658
1659
# File 'generated/google/apis/ml_v1/classes.rb', line 1657

def goal
  @goal
end

#hyperparameter_metric_tagString

Optional. The Tensorflow summary tag name to use for optimizing trials. For current versions of Tensorflow, this tag name should exactly match what is shown in Tensorboard, including all scopes. For versions of Tensorflow prior to 0.12, this should be only the tag passed to tf.Summary. By default, "training/hptuning/metric" will be used. Corresponds to the JSON property hyperparameterMetricTag

Returns:

  • (String)


1666
1667
1668
# File 'generated/google/apis/ml_v1/classes.rb', line 1666

def hyperparameter_metric_tag
  @hyperparameter_metric_tag
end

#max_parallel_trialsFixnum

Optional. The number of training trials to run concurrently. You can reduce the time it takes to perform hyperparameter tuning by adding trials in parallel. However, each trail only benefits from the information gained in completed trials. That means that a trial does not get access to the results of trials running at the same time, which could reduce the quality of the overall optimization. Each trial will use the same scale tier and machine types. Defaults to one. Corresponds to the JSON property maxParallelTrials

Returns:

  • (Fixnum)


1690
1691
1692
# File 'generated/google/apis/ml_v1/classes.rb', line 1690

def max_parallel_trials
  @max_parallel_trials
end

#max_trialsFixnum

Optional. How many training trials should be attempted to optimize the specified hyperparameters. Defaults to one. Corresponds to the JSON property maxTrials

Returns:

  • (Fixnum)


1678
1679
1680
# File 'generated/google/apis/ml_v1/classes.rb', line 1678

def max_trials
  @max_trials
end

#paramsArray<Google::Apis::MlV1::GoogleCloudMlV1ParameterSpec>

Required. The set of parameters to tune. Corresponds to the JSON property params



1671
1672
1673
# File 'generated/google/apis/ml_v1/classes.rb', line 1671

def params
  @params
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1697
1698
1699
1700
1701
1702
1703
# File 'generated/google/apis/ml_v1/classes.rb', line 1697

def update!(**args)
  @goal = args[:goal] if args.key?(:goal)
  @hyperparameter_metric_tag = args[:hyperparameter_metric_tag] if args.key?(:hyperparameter_metric_tag)
  @params = args[:params] if args.key?(:params)
  @max_trials = args[:max_trials] if args.key?(:max_trials)
  @max_parallel_trials = args[:max_parallel_trials] if args.key?(:max_parallel_trials)
end