Cloud AutoML V1beta1 Client - Class TextSentimentEvaluationMetrics (1.5.4)

Reference documentation and code samples for the Cloud AutoML V1beta1 Client class TextSentimentEvaluationMetrics.

Model evaluation metrics for text sentiment problems.

Generated from protobuf message google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics

Namespace

Google \ Cloud \ AutoMl \ V1beta1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ precision float

Output only. Precision.

↳ recall float

Output only. Recall.

↳ f1_score float

Output only. The harmonic mean of recall and precision.

↳ mean_absolute_error float

Output only. Mean absolute error. Only set for the overall model evaluation, not for evaluation of a single annotation spec.

↳ mean_squared_error float

Output only. Mean squared error. Only set for the overall model evaluation, not for evaluation of a single annotation spec.

↳ linear_kappa float

Output only. Linear weighted kappa. Only set for the overall model evaluation, not for evaluation of a single annotation spec.

↳ quadratic_kappa float

Output only. Quadratic weighted kappa. Only set for the overall model evaluation, not for evaluation of a single annotation spec.

↳ confusion_matrix Google\Cloud\AutoMl\V1beta1\ClassificationEvaluationMetrics\ConfusionMatrix

Output only. Confusion matrix of the evaluation. Only set for the overall model evaluation, not for evaluation of a single annotation spec.

↳ annotation_spec_id array

Output only. The annotation spec ids used for this evaluation. Deprecated .

getPrecision

Output only. Precision.

Returns
TypeDescription
float

setPrecision

Output only. Precision.

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getRecall

Output only. Recall.

Returns
TypeDescription
float

setRecall

Output only. Recall.

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getF1Score

Output only. The harmonic mean of recall and precision.

Returns
TypeDescription
float

setF1Score

Output only. The harmonic mean of recall and precision.

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getMeanAbsoluteError

Output only. Mean absolute error. Only set for the overall model evaluation, not for evaluation of a single annotation spec.

Returns
TypeDescription
float

setMeanAbsoluteError

Output only. Mean absolute error. Only set for the overall model evaluation, not for evaluation of a single annotation spec.

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getMeanSquaredError

Output only. Mean squared error. Only set for the overall model evaluation, not for evaluation of a single annotation spec.

Returns
TypeDescription
float

setMeanSquaredError

Output only. Mean squared error. Only set for the overall model evaluation, not for evaluation of a single annotation spec.

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getLinearKappa

Output only. Linear weighted kappa. Only set for the overall model evaluation, not for evaluation of a single annotation spec.

Returns
TypeDescription
float

setLinearKappa

Output only. Linear weighted kappa. Only set for the overall model evaluation, not for evaluation of a single annotation spec.

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getQuadraticKappa

Output only. Quadratic weighted kappa. Only set for the overall model evaluation, not for evaluation of a single annotation spec.

Returns
TypeDescription
float

setQuadraticKappa

Output only. Quadratic weighted kappa. Only set for the overall model evaluation, not for evaluation of a single annotation spec.

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getConfusionMatrix

Output only. Confusion matrix of the evaluation.

Only set for the overall model evaluation, not for evaluation of a single annotation spec.

Returns
TypeDescription
Google\Cloud\AutoMl\V1beta1\ClassificationEvaluationMetrics\ConfusionMatrix|null

hasConfusionMatrix

clearConfusionMatrix

setConfusionMatrix

Output only. Confusion matrix of the evaluation.

Only set for the overall model evaluation, not for evaluation of a single annotation spec.

Parameter
NameDescription
var Google\Cloud\AutoMl\V1beta1\ClassificationEvaluationMetrics\ConfusionMatrix
Returns
TypeDescription
$this

getAnnotationSpecId

Output only. The annotation spec ids used for this evaluation.

Deprecated .

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setAnnotationSpecId

Output only. The annotation spec ids used for this evaluation.

Deprecated .

Parameter
NameDescription
var string[]
Returns
TypeDescription
$this