Google Cloud Document Ai V1 Client - Class Metrics (1.2.2)

Reference documentation and code samples for the Google Cloud Document Ai V1 Client class Metrics.

Evaluation metrics, either in aggregate or about a specific entity.

Generated from protobuf message google.cloud.documentai.v1.Evaluation.Metrics

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ precision float

The calculated precision.

↳ recall float

The calculated recall.

↳ f1_score float

The calculated f1 score.

↳ predicted_occurrences_count int

The amount of occurrences in predicted documents.

↳ ground_truth_occurrences_count int

The amount of occurrences in ground truth documents.

↳ predicted_document_count int

The amount of documents with a predicted occurrence.

↳ ground_truth_document_count int

The amount of documents with a ground truth occurrence.

↳ true_positives_count int

The amount of true positives.

↳ false_positives_count int

The amount of false positives.

↳ false_negatives_count int

The amount of false negatives.

↳ total_documents_count int

The amount of documents that had an occurrence of this label.

getPrecision

The calculated precision.

Returns
TypeDescription
float

setPrecision

The calculated precision.

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getRecall

The calculated recall.

Returns
TypeDescription
float

setRecall

The calculated recall.

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getF1Score

The calculated f1 score.

Returns
TypeDescription
float

setF1Score

The calculated f1 score.

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getPredictedOccurrencesCount

The amount of occurrences in predicted documents.

Returns
TypeDescription
int

setPredictedOccurrencesCount

The amount of occurrences in predicted documents.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getGroundTruthOccurrencesCount

The amount of occurrences in ground truth documents.

Returns
TypeDescription
int

setGroundTruthOccurrencesCount

The amount of occurrences in ground truth documents.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getPredictedDocumentCount

The amount of documents with a predicted occurrence.

Returns
TypeDescription
int

setPredictedDocumentCount

The amount of documents with a predicted occurrence.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getGroundTruthDocumentCount

The amount of documents with a ground truth occurrence.

Returns
TypeDescription
int

setGroundTruthDocumentCount

The amount of documents with a ground truth occurrence.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getTruePositivesCount

The amount of true positives.

Returns
TypeDescription
int

setTruePositivesCount

The amount of true positives.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getFalsePositivesCount

The amount of false positives.

Returns
TypeDescription
int

setFalsePositivesCount

The amount of false positives.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getFalseNegativesCount

The amount of false negatives.

Returns
TypeDescription
int

setFalseNegativesCount

The amount of false negatives.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getTotalDocumentsCount

The amount of documents that had an occurrence of this label.

Returns
TypeDescription
int

setTotalDocumentsCount

The amount of documents that had an occurrence of this label.

Parameter
NameDescription
var int
Returns
TypeDescription
$this