Google Cloud Dialogflow V2 Client - Class TopNMetrics (1.15.1)

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
Name Description
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
Type Description
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
Name Description
var int
Returns
Type Description
$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
Type Description
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
Name Description
var float
Returns
Type Description
$this