Class: AWSCDK::Personalize::CfnSolution::HpoConfigProperty

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

Overview

Describes the properties for hyperparameter optimization (HPO).

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(algorithm_hyper_parameter_ranges: nil, hpo_objective: nil, hpo_resource_config: nil) ⇒ HpoConfigProperty

Returns a new instance of HpoConfigProperty.

Parameters:



788
789
790
791
792
793
794
795
# File 'personalize/cfn_solution.rb', line 788

def initialize(algorithm_hyper_parameter_ranges: nil, hpo_objective: nil, hpo_resource_config: nil)
  @algorithm_hyper_parameter_ranges = algorithm_hyper_parameter_ranges.is_a?(Hash) ? ::AWSCDK::Personalize::CfnSolution::AlgorithmHyperParameterRangesProperty.new(**algorithm_hyper_parameter_ranges.transform_keys(&:to_sym)) : algorithm_hyper_parameter_ranges
  Jsii::Type.check_type(@algorithm_hyper_parameter_ranges, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19wZXJzb25hbGl6ZS5DZm5Tb2x1dGlvbi5BbGdvcml0aG1IeXBlclBhcmFtZXRlclJhbmdlc1Byb3BlcnR5In1dfX0=")), "algorithmHyperParameterRanges") unless @algorithm_hyper_parameter_ranges.nil?
  @hpo_objective = hpo_objective.is_a?(Hash) ? ::AWSCDK::Personalize::CfnSolution::HpoObjectiveProperty.new(**hpo_objective.transform_keys(&:to_sym)) : hpo_objective
  Jsii::Type.check_type(@hpo_objective, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19wZXJzb25hbGl6ZS5DZm5Tb2x1dGlvbi5IcG9PYmplY3RpdmVQcm9wZXJ0eSJ9XX19")), "hpoObjective") unless @hpo_objective.nil?
  @hpo_resource_config = hpo_resource_config.is_a?(Hash) ? ::AWSCDK::Personalize::CfnSolution::HpoResourceConfigProperty.new(**hpo_resource_config.transform_keys(&:to_sym)) : hpo_resource_config
  Jsii::Type.check_type(@hpo_resource_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19wZXJzb25hbGl6ZS5DZm5Tb2x1dGlvbi5IcG9SZXNvdXJjZUNvbmZpZ1Byb3BlcnR5In1dfX0=")), "hpoResourceConfig") unless @hpo_resource_config.nil?
end

Instance Attribute Details

#algorithm_hyper_parameter_rangesAWSCDK::IResolvable, ... (readonly)

The hyperparameters and their allowable ranges.



801
802
803
# File 'personalize/cfn_solution.rb', line 801

def algorithm_hyper_parameter_ranges
  @algorithm_hyper_parameter_ranges
end

#hpo_objectiveAWSCDK::IResolvable, ... (readonly)

The metric to optimize during HPO.

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



808
809
810
# File 'personalize/cfn_solution.rb', line 808

def hpo_objective
  @hpo_objective
end

#hpo_resource_configAWSCDK::IResolvable, ... (readonly)

Describes the resource configuration for HPO.



813
814
815
# File 'personalize/cfn_solution.rb', line 813

def hpo_resource_config
  @hpo_resource_config
end

Class Method Details

.jsii_propertiesObject



815
816
817
818
819
820
821
# File 'personalize/cfn_solution.rb', line 815

def self.jsii_properties
  {
    :algorithm_hyper_parameter_ranges => "algorithmHyperParameterRanges",
    :hpo_objective => "hpoObjective",
    :hpo_resource_config => "hpoResourceConfig",
  }
end

Instance Method Details

#to_jsiiObject



823
824
825
826
827
828
829
830
831
# File 'personalize/cfn_solution.rb', line 823

def to_jsii
  result = {}
  result.merge!({
    "algorithmHyperParameterRanges" => @algorithm_hyper_parameter_ranges,
    "hpoObjective" => @hpo_objective,
    "hpoResourceConfig" => @hpo_resource_config,
  })
  result.compact
end