Google Cloud Dialogflow V2 Client - Class TopNMetrics (1.10.2)

Reference documentation and code samples for the Google Cloud Dialogflow V2 Client class TopNMetrics.

Evaluation metrics when retrieving n smart replies with the model.

Generated from protobuf message google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics

Namespace

Google \ Cloud \ Dialogflow \ V2 \ SmartReplyMetrics

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ n int

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.

↳ recall float

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.

getN

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.

Returns
TypeDescription
int

setN

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.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getRecall

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.

Returns
TypeDescription
float

setRecall

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.

Parameter
NameDescription
var float
Returns
TypeDescription
$this