# Google Cloud Ai Platform V1 Client - Class Visualization (1.60.0)

1.60.0 (latest) 1.59.0 1.58.0 1.57.0 1.56.0 1.55.0 1.54.0 1.53.0 1.52.0 1.51.0 1.50.0 1.49.0 1.48.0 1.47.0 1.46.0 1.45.0 1.44.0 1.43.0 1.42.0 1.41.0 1.40.0 1.39.0 1.38.0 1.37.0 1.36.0 1.35.0 1.34.0 1.33.0 1.32.1 1.31.0 1.30.0 1.26.0 1.23.0 1.22.0 1.21.0 1.20.0 1.19.0 1.18.0 1.17.0 1.16.0 1.15.0 1.14.0 1.13.1 1.12.0 1.11.0 1.10.0 1.9.0 1.8.0 1.7.0 1.6.0 1.5.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0 0.39.0 0.38.0 0.37.1 0.32.0 0.31.0 0.30.0 0.29.0 0.28.0 0.27.0 0.26.2 0.25.0 0.24.0 0.23.0 0.22.0 0.21.0 0.20.0 0.19.0 0.18.0 0.17.0 0.16.0 0.15.0 0.13.0 0.12.0 0.11.1 0.10.0 Reference documentation and code samples for the Google Cloud Ai Platform V1 Client class Visualization.

Visualization configurations for image explanation.

Generated from protobuf message `google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization`

## Namespace

Google \\ Cloud \\ AIPlatform \\ V1 \\ ExplanationMetadata \\ InputMetadata

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ type` | `int` Type of the image visualization. Only applicable to [Integrated Gradients attribution](https://docs.cloud.google.com/php/docs/reference/cloud-ai-platform/latest/V1.ExplanationParameters#_Google_Cloud_AIPlatform_V1_ExplanationParameters__getIntegratedGradientsAttribution__). OUTLINES shows regions of attribution, while PIXELS shows per-pixel attribution. Defaults to OUTLINES. |
| `↳ polarity` | `int` Whether to only highlight pixels with positive contributions, negative or both. Defaults to POSITIVE. |
| `↳ color_map` | `int` The color scheme used for the highlighted areas. Defaults to PINK_GREEN for [Integrated Gradients attribution](https://docs.cloud.google.com/php/docs/reference/cloud-ai-platform/latest/V1.ExplanationParameters#_Google_Cloud_AIPlatform_V1_ExplanationParameters__getIntegratedGradientsAttribution__), which shows positive attributions in green and negative in pink. Defaults to VIRIDIS for [XRAI attribution](https://docs.cloud.google.com/php/docs/reference/cloud-ai-platform/latest/V1.ExplanationParameters#_Google_Cloud_AIPlatform_V1_ExplanationParameters__getXraiAttribution__), which highlights the most influential regions in yellow and the least influential in blue. |
| `↳ clip_percent_upperbound` | `float` Excludes attributions above the specified percentile from the highlighted areas. Using the clip_percent_upperbound and clip_percent_lowerbound together can be useful for filtering out noise and making it easier to see areas of strong attribution. Defaults to 99.9. |
| `↳ clip_percent_lowerbound` | `float` Excludes attributions below the specified percentile, from the highlighted areas. Defaults to 62. |
| `↳ overlay_type` | `int` How the original image is displayed in the visualization. Adjusting the overlay can help increase visual clarity if the original image makes it difficult to view the visualization. Defaults to NONE. |

### getType

Type of the image visualization. Only applicable to
[Integrated Gradients
attribution](https://docs.cloud.google.com/php/docs/reference/cloud-ai-platform/latest/V1.ExplanationParameters#_Google_Cloud_AIPlatform_V1_ExplanationParameters__getIntegratedGradientsAttribution__).

OUTLINES shows regions of attribution, while PIXELS shows per-pixel
attribution. Defaults to OUTLINES.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Type](https://docs.cloud.google.com/php/docs/reference/cloud-ai-platform/latest/V1.ExplanationMetadata.InputMetadata.Visualization.Type). |

### setType

Type of the image visualization. Only applicable to
[Integrated Gradients
attribution](https://docs.cloud.google.com/php/docs/reference/cloud-ai-platform/latest/V1.ExplanationParameters#_Google_Cloud_AIPlatform_V1_ExplanationParameters__getIntegratedGradientsAttribution__).

OUTLINES shows regions of attribution, while PIXELS shows per-pixel
attribution. Defaults to OUTLINES.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Type](https://docs.cloud.google.com/php/docs/reference/cloud-ai-platform/latest/V1.ExplanationMetadata.InputMetadata.Visualization.Type). |

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

### getPolarity

Whether to only highlight pixels with positive contributions, negative
or both. Defaults to POSITIVE.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Polarity](https://docs.cloud.google.com/php/docs/reference/cloud-ai-platform/latest/V1.ExplanationMetadata.InputMetadata.Visualization.Polarity). |

### setPolarity

Whether to only highlight pixels with positive contributions, negative
or both. Defaults to POSITIVE.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Polarity](https://docs.cloud.google.com/php/docs/reference/cloud-ai-platform/latest/V1.ExplanationMetadata.InputMetadata.Visualization.Polarity). |

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

### getColorMap

The color scheme used for the highlighted areas.

Defaults to PINK_GREEN for
[Integrated Gradients
attribution](https://docs.cloud.google.com/php/docs/reference/cloud-ai-platform/latest/V1.ExplanationParameters#_Google_Cloud_AIPlatform_V1_ExplanationParameters__getIntegratedGradientsAttribution__),
which shows positive attributions in green and negative in pink.
Defaults to VIRIDIS for
[XRAI
attribution](https://docs.cloud.google.com/php/docs/reference/cloud-ai-platform/latest/V1.ExplanationParameters#_Google_Cloud_AIPlatform_V1_ExplanationParameters__getXraiAttribution__),
which highlights the most influential regions in yellow and the least
influential in blue.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [ColorMap](https://docs.cloud.google.com/php/docs/reference/cloud-ai-platform/latest/V1.ExplanationMetadata.InputMetadata.Visualization.ColorMap). |

### setColorMap

The color scheme used for the highlighted areas.

Defaults to PINK_GREEN for
[Integrated Gradients
attribution](https://docs.cloud.google.com/php/docs/reference/cloud-ai-platform/latest/V1.ExplanationParameters#_Google_Cloud_AIPlatform_V1_ExplanationParameters__getIntegratedGradientsAttribution__),
which shows positive attributions in green and negative in pink.
Defaults to VIRIDIS for
[XRAI
attribution](https://docs.cloud.google.com/php/docs/reference/cloud-ai-platform/latest/V1.ExplanationParameters#_Google_Cloud_AIPlatform_V1_ExplanationParameters__getXraiAttribution__),
which highlights the most influential regions in yellow and the least
influential in blue.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [ColorMap](https://docs.cloud.google.com/php/docs/reference/cloud-ai-platform/latest/V1.ExplanationMetadata.InputMetadata.Visualization.ColorMap). |

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

### getClipPercentUpperbound

Excludes attributions above the specified percentile from the
highlighted areas. Using the clip_percent_upperbound and
clip_percent_lowerbound together can be useful for filtering out noise
and making it easier to see areas of strong attribution. Defaults to
99.9.

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

### setClipPercentUpperbound

Excludes attributions above the specified percentile from the
highlighted areas. Using the clip_percent_upperbound and
clip_percent_lowerbound together can be useful for filtering out noise
and making it easier to see areas of strong attribution. Defaults to
99.9.

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

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

### getClipPercentLowerbound

Excludes attributions below the specified percentile, from the
highlighted areas. Defaults to 62.

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

### setClipPercentLowerbound

Excludes attributions below the specified percentile, from the
highlighted areas. Defaults to 62.

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

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

### getOverlayType

How the original image is displayed in the visualization.

Adjusting the overlay can help increase visual clarity if the original
image makes it difficult to view the visualization. Defaults to NONE.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [OverlayType](https://docs.cloud.google.com/php/docs/reference/cloud-ai-platform/latest/V1.ExplanationMetadata.InputMetadata.Visualization.OverlayType). |

### setOverlayType

How the original image is displayed in the visualization.

Adjusting the overlay can help increase visual clarity if the original
image makes it difficult to view the visualization. Defaults to NONE.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [OverlayType](https://docs.cloud.google.com/php/docs/reference/cloud-ai-platform/latest/V1.ExplanationMetadata.InputMetadata.Visualization.OverlayType). |

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