Class: AWSCDK::Personalize::CfnSolutionProps

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

Overview

Properties for defining a CfnSolution.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dataset_group_arn:, name:, event_type: nil, perform_auto_ml: nil, perform_hpo: nil, recipe_arn: nil, solution_config: nil) ⇒ CfnSolutionProps

Returns a new instance of CfnSolutionProps.

Parameters:

  • dataset_group_arn (String)

    The Amazon Resource Name (ARN) of the dataset group that provides the training data.

  • name (String)

    The name of the solution.

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

    The event type (for example, 'click' or 'like') that is used for training the model.

  • perform_auto_ml (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    We don't recommend enabling automated machine learning.

  • perform_hpo (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Whether to perform hyperparameter optimization (HPO) on the chosen recipe.

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

    The ARN of the recipe used to create the solution.

  • solution_config (AWSCDK::IResolvable, AWSCDK::Personalize::CfnSolution::SolutionConfigProperty, nil) (defaults to: nil)

    Describes the configuration properties for the solution.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'personalize/cfn_solution_props.rb', line 16

def initialize(dataset_group_arn:, name:, event_type: nil, perform_auto_ml: nil, perform_hpo: nil, recipe_arn: nil, solution_config: nil)
  @dataset_group_arn = dataset_group_arn
  Jsii::Type.check_type(@dataset_group_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "datasetGroupArn")
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @event_type = event_type
  Jsii::Type.check_type(@event_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "eventType") unless @event_type.nil?
  @perform_auto_ml = perform_auto_ml
  Jsii::Type.check_type(@perform_auto_ml, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "performAutoMl") unless @perform_auto_ml.nil?
  @perform_hpo = perform_hpo
  Jsii::Type.check_type(@perform_hpo, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "performHpo") unless @perform_hpo.nil?
  @recipe_arn = recipe_arn
  Jsii::Type.check_type(@recipe_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "recipeArn") unless @recipe_arn.nil?
  @solution_config = solution_config.is_a?(Hash) ? ::AWSCDK::Personalize::CfnSolution::SolutionConfigProperty.new(**solution_config.transform_keys(&:to_sym)) : solution_config
  Jsii::Type.check_type(@solution_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19wZXJzb25hbGl6ZS5DZm5Tb2x1dGlvbi5Tb2x1dGlvbkNvbmZpZ1Byb3BlcnR5In1dfX0=")), "solutionConfig") unless @solution_config.nil?
end

Instance Attribute Details

#dataset_group_arnString (readonly)

The Amazon Resource Name (ARN) of the dataset group that provides the training data.



37
38
39
# File 'personalize/cfn_solution_props.rb', line 37

def dataset_group_arn
  @dataset_group_arn
end

#event_typeString? (readonly)

The event type (for example, 'click' or 'like') that is used for training the model.

If no event_type is provided, Amazon Personalize uses all interactions for training with equal weight regardless of type.



49
50
51
# File 'personalize/cfn_solution_props.rb', line 49

def event_type
  @event_type
end

#nameString (readonly)

The name of the solution.



42
43
44
# File 'personalize/cfn_solution_props.rb', line 42

def name
  @name
end

#perform_auto_mlBoolean, ... (readonly)

We don't recommend enabling automated machine learning.

Instead, match your use case to the available Amazon Personalize recipes. For more information, see Determining your use case.

When true, Amazon Personalize performs a search for the best USER_PERSONALIZATION recipe from the list specified in the solution configuration ( recipe_arn must not be specified). When false (the default), Amazon Personalize uses recipe_arn for training.



58
59
60
# File 'personalize/cfn_solution_props.rb', line 58

def perform_auto_ml
  @perform_auto_ml
end

#perform_hpoBoolean, ... (readonly)

Whether to perform hyperparameter optimization (HPO) on the chosen recipe.

The default is false .



65
66
67
# File 'personalize/cfn_solution_props.rb', line 65

def perform_hpo
  @perform_hpo
end

#recipe_arnString? (readonly)

The ARN of the recipe used to create the solution.

This is required when perform_auto_ml is false.



72
73
74
# File 'personalize/cfn_solution_props.rb', line 72

def recipe_arn
  @recipe_arn
end

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

Describes the configuration properties for the solution.



77
78
79
# File 'personalize/cfn_solution_props.rb', line 77

def solution_config
  @solution_config
end

Class Method Details

.jsii_propertiesObject



79
80
81
82
83
84
85
86
87
88
89
# File 'personalize/cfn_solution_props.rb', line 79

def self.jsii_properties
  {
    :dataset_group_arn => "datasetGroupArn",
    :name => "name",
    :event_type => "eventType",
    :perform_auto_ml => "performAutoMl",
    :perform_hpo => "performHpo",
    :recipe_arn => "recipeArn",
    :solution_config => "solutionConfig",
  }
end

Instance Method Details

#to_jsiiObject



91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'personalize/cfn_solution_props.rb', line 91

def to_jsii
  result = {}
  result.merge!({
    "datasetGroupArn" => @dataset_group_arn,
    "name" => @name,
    "eventType" => @event_type,
    "performAutoMl" => @perform_auto_ml,
    "performHpo" => @perform_hpo,
    "recipeArn" => @recipe_arn,
    "solutionConfig" => @solution_config,
  })
  result.compact
end