Class: AWSCDK::Personalize::CfnSolution::HpoObjectiveProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
personalize/cfn_solution.rb

Overview

The metric to optimize during hyperparameter optimization (HPO).

Amazon Personalize doesn't support configuring the hpo_objective at this time.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(metric_name: nil, metric_regex: nil, type: nil) ⇒ HpoObjectiveProperty

Returns a new instance of HpoObjectiveProperty.

Parameters:

  • metric_name (String, nil) (defaults to: nil)

    The name of the metric.

  • metric_regex (String, nil) (defaults to: nil)

    A regular expression for finding the metric in the training job logs.

  • type (String, nil) (defaults to: nil)

    The type of the metric.



845
846
847
848
849
850
851
852
# File 'personalize/cfn_solution.rb', line 845

def initialize(metric_name: nil, metric_regex: nil, type: nil)
  @metric_name = metric_name
  Jsii::Type.check_type(@metric_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "metricName") unless @metric_name.nil?
  @metric_regex = metric_regex
  Jsii::Type.check_type(@metric_regex, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "metricRegex") unless @metric_regex.nil?
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type") unless @type.nil?
end

Instance Attribute Details

#metric_nameString? (readonly)

The name of the metric.



858
859
860
# File 'personalize/cfn_solution.rb', line 858

def metric_name
  @metric_name
end

#metric_regexString? (readonly)

A regular expression for finding the metric in the training job logs.



863
864
865
# File 'personalize/cfn_solution.rb', line 863

def metric_regex
  @metric_regex
end

#typeString? (readonly)

The type of the metric.

Valid values are Maximize and Minimize .



870
871
872
# File 'personalize/cfn_solution.rb', line 870

def type
  @type
end

Class Method Details

.jsii_propertiesObject



872
873
874
875
876
877
878
# File 'personalize/cfn_solution.rb', line 872

def self.jsii_properties
  {
    :metric_name => "metricName",
    :metric_regex => "metricRegex",
    :type => "type",
  }
end

Instance Method Details

#to_jsiiObject



880
881
882
883
884
885
886
887
888
# File 'personalize/cfn_solution.rb', line 880

def to_jsii
  result = {}
  result.merge!({
    "metricName" => @metric_name,
    "metricRegex" => @metric_regex,
    "type" => @type,
  })
  result.compact
end