Class: Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SmartReplyMetricsTopNMetrics

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/dialogflow_v2/classes.rb,
lib/google/apis/dialogflow_v2/representations.rb,
lib/google/apis/dialogflow_v2/representations.rb

Overview

Evaluation metrics when retrieving n smart replies with the model.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowV2SmartReplyMetricsTopNMetrics

Returns a new instance of GoogleCloudDialogflowV2SmartReplyMetricsTopNMetrics.



12351
12352
12353
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 12351

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#nFixnum

Number of retrieved smart replies. For example, when n is 3, this evaluation contains metrics for when Dialogflow retrieves 3 smart replies with the model. Corresponds to the JSON property n

Returns:

  • (Fixnum)


12341
12342
12343
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 12341

def n
  @n
end

#recallFloat

Defined as number of queries whose top n smart replies have at least one similar (token match similarity above the defined threshold) reply as the real reply divided by number of queries with at least one smart reply. Value ranges from 0.0 to 1.0 inclusive. Corresponds to the JSON property recall

Returns:

  • (Float)


12349
12350
12351
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 12349

def recall
  @recall
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



12356
12357
12358
12359
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 12356

def update!(**args)
  @n = args[:n] if args.key?(:n)
  @recall = args[:recall] if args.key?(:recall)
end