Class: AWSCDK::Glue::CfnMLTransform::FindMatchesParametersProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
glue/cfn_ml_transform.rb

Overview

The parameters to configure the find matches transform.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(primary_key_column_name:, accuracy_cost_tradeoff: nil, enforce_provided_labels: nil, precision_recall_tradeoff: nil) ⇒ FindMatchesParametersProperty

Returns a new instance of FindMatchesParametersProperty.

Parameters:

  • primary_key_column_name (String)

    The name of a column that uniquely identifies rows in the source table.

  • accuracy_cost_tradeoff (Numeric, nil) (defaults to: nil)

    The value that is selected when tuning your transform for a balance between accuracy and cost.

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

    The value to switch on or off to force the output to match the provided labels from users.

  • precision_recall_tradeoff (Numeric, nil) (defaults to: nil)

    The value selected when tuning your transform for a balance between precision and recall.



671
672
673
674
675
676
677
678
679
680
# File 'glue/cfn_ml_transform.rb', line 671

def initialize(primary_key_column_name:, accuracy_cost_tradeoff: nil, enforce_provided_labels: nil, precision_recall_tradeoff: nil)
  @primary_key_column_name = primary_key_column_name
  Jsii::Type.check_type(@primary_key_column_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "primaryKeyColumnName")
  @accuracy_cost_tradeoff = accuracy_cost_tradeoff
  Jsii::Type.check_type(@accuracy_cost_tradeoff, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "accuracyCostTradeoff") unless @accuracy_cost_tradeoff.nil?
  @enforce_provided_labels = enforce_provided_labels
  Jsii::Type.check_type(@enforce_provided_labels, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enforceProvidedLabels") unless @enforce_provided_labels.nil?
  @precision_recall_tradeoff = precision_recall_tradeoff
  Jsii::Type.check_type(@precision_recall_tradeoff, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "precisionRecallTradeoff") unless @precision_recall_tradeoff.nil?
end

Instance Attribute Details

#accuracy_cost_tradeoffNumeric? (readonly)

The value that is selected when tuning your transform for a balance between accuracy and cost.

A value of 0.5 means that the system balances accuracy and cost concerns. A value of 1.0 means a bias purely for accuracy, which typically results in a higher cost, sometimes substantially higher. A value of 0.0 means a bias purely for cost, which results in a less accurate FindMatches transform, sometimes with unacceptable accuracy.

Accuracy measures how well the transform finds true positives and true negatives. Increasing accuracy requires more machine resources and cost. But it also results in increased recall.

Cost measures how many compute resources, and thus money, are consumed to run the transform.



699
700
701
# File 'glue/cfn_ml_transform.rb', line 699

def accuracy_cost_tradeoff
  @accuracy_cost_tradeoff
end

#enforce_provided_labelsBoolean, ... (readonly)

The value to switch on or off to force the output to match the provided labels from users.

If the value is True , the find matches transform forces the output to match the provided labels. The results override the normal conflation results. If the value is False , the find matches transform does not ensure all the labels provided are respected, and the results rely on the trained model.

Note that setting this value to true may increase the conflation execution time.



708
709
710
# File 'glue/cfn_ml_transform.rb', line 708

def enforce_provided_labels
  @enforce_provided_labels
end

#precision_recall_tradeoffNumeric? (readonly)

The value selected when tuning your transform for a balance between precision and recall.

A value of 0.5 means no preference; a value of 1.0 means a bias purely for precision, and a value of 0.0 means a bias for recall. Because this is a tradeoff, choosing values close to 1.0 means very low recall, and choosing values close to 0.0 results in very low precision.

The precision metric indicates how often your model is correct when it predicts a match.

The recall metric indicates that for an actual match, how often your model predicts the match.



719
720
721
# File 'glue/cfn_ml_transform.rb', line 719

def precision_recall_tradeoff
  @precision_recall_tradeoff
end

#primary_key_column_nameString (readonly)

The name of a column that uniquely identifies rows in the source table.

Used to help identify matching records.



688
689
690
# File 'glue/cfn_ml_transform.rb', line 688

def primary_key_column_name
  @primary_key_column_name
end

Class Method Details

.jsii_propertiesObject



721
722
723
724
725
726
727
728
# File 'glue/cfn_ml_transform.rb', line 721

def self.jsii_properties
  {
    :primary_key_column_name => "primaryKeyColumnName",
    :accuracy_cost_tradeoff => "accuracyCostTradeoff",
    :enforce_provided_labels => "enforceProvidedLabels",
    :precision_recall_tradeoff => "precisionRecallTradeoff",
  }
end

Instance Method Details

#to_jsiiObject



730
731
732
733
734
735
736
737
738
739
# File 'glue/cfn_ml_transform.rb', line 730

def to_jsii
  result = {}
  result.merge!({
    "primaryKeyColumnName" => @primary_key_column_name,
    "accuracyCostTradeoff" => @accuracy_cost_tradeoff,
    "enforceProvidedLabels" => @enforce_provided_labels,
    "precisionRecallTradeoff" => @precision_recall_tradeoff,
  })
  result.compact
end