# Cloud AutoML V1 Client - Class TextSentimentEvaluationMetrics (2.1.3)

2.1.3 (latest) 2.1.2 2.0.5 1.6.5 1.5.4 1.4.17 Reference documentation and code samples for the Cloud AutoML V1 Client class TextSentimentEvaluationMetrics.

Model evaluation metrics for text sentiment problems.

Generated from protobuf message `google.cloud.automl.v1.TextSentimentEvaluationMetrics`

## Namespace

Google \\ Cloud \\ AutoMl \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `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` | `https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.ClassificationEvaluationMetrics.ConfusionMatrix` Output only. Confusion matrix of the evaluation. Only set for the overall model evaluation, not for evaluation of a single annotation spec. |

### getPrecision

Output only. Precision.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### setPrecision

Output only. Precision.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `float` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getRecall

Output only. Recall.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### setRecall

Output only. Recall.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `float` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getF1Score

Output only. The harmonic mean of recall and precision.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### setF1Score

Output only. The harmonic mean of recall and precision.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `float` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getMeanAbsoluteError

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### setMeanAbsoluteError

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `float` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getMeanSquaredError

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### setMeanSquaredError

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `float` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getLinearKappa

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### setLinearKappa

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `float` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getQuadraticKappa

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### setQuadraticKappa

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `float` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$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** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.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** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.ClassificationEvaluationMetrics.ConfusionMatrix` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |