Class: AWSCDK::Evidently::CfnExperiment::TreatmentToWeightProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
evidently/cfn_experiment.rb

Overview

This structure defines how much experiment traffic to allocate to one treatment used in the experiment.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(split_weight:, treatment:) ⇒ TreatmentToWeightProperty

Returns a new instance of TreatmentToWeightProperty.

Parameters:

  • split_weight (Numeric)

    The portion of experiment traffic to allocate to this treatment.

  • treatment (String)

    The name of the treatment.



941
942
943
944
945
946
# File 'evidently/cfn_experiment.rb', line 941

def initialize(split_weight:, treatment:)
  @split_weight = split_weight
  Jsii::Type.check_type(@split_weight, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "splitWeight")
  @treatment = treatment
  Jsii::Type.check_type(@treatment, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "treatment")
end

Instance Attribute Details

#split_weightNumeric (readonly)

The portion of experiment traffic to allocate to this treatment.

Specify the traffic portion in thousandths of a percent, so 20,000 allocated to a treatment would allocate 20% of the experiment traffic to that treatment.



954
955
956
# File 'evidently/cfn_experiment.rb', line 954

def split_weight
  @split_weight
end

#treatmentString (readonly)

The name of the treatment.



959
960
961
# File 'evidently/cfn_experiment.rb', line 959

def treatment
  @treatment
end

Class Method Details

.jsii_propertiesObject



961
962
963
964
965
966
# File 'evidently/cfn_experiment.rb', line 961

def self.jsii_properties
  {
    :split_weight => "splitWeight",
    :treatment => "treatment",
  }
end

Instance Method Details

#to_jsiiObject



968
969
970
971
972
973
974
975
# File 'evidently/cfn_experiment.rb', line 968

def to_jsii
  result = {}
  result.merge!({
    "splitWeight" => @split_weight,
    "treatment" => @treatment,
  })
  result.compact
end