Google Cloud Ai Platform V1 Client - Class Visualization (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

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ type int

Type of the image visualization. Only applicable to Integrated Gradients attribution. 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, which shows positive attributions in green and negative in pink. Defaults to VIRIDIS for XRAI attribution, 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.

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

Generated from protobuf field .google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization.Type type = 1;

Returns
TypeDescription
int

setType

Type of the image visualization. Only applicable to Integrated Gradients attribution.

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

Generated from protobuf field .google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization.Type type = 1;

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getPolarity

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

Generated from protobuf field .google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization.Polarity polarity = 2;

Returns
TypeDescription
int

setPolarity

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

Generated from protobuf field .google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization.Polarity polarity = 2;

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getColorMap

The color scheme used for the highlighted areas.

Defaults to PINK_GREEN for Integrated Gradients attribution, which shows positive attributions in green and negative in pink. Defaults to VIRIDIS for XRAI attribution, which highlights the most influential regions in yellow and the least influential in blue.

Generated from protobuf field .google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization.ColorMap color_map = 3;

Returns
TypeDescription
int

setColorMap

The color scheme used for the highlighted areas.

Defaults to PINK_GREEN for Integrated Gradients attribution, which shows positive attributions in green and negative in pink. Defaults to VIRIDIS for XRAI attribution, which highlights the most influential regions in yellow and the least influential in blue.

Generated from protobuf field .google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization.ColorMap color_map = 3;

Parameter
NameDescription
var int
Returns
TypeDescription
$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.

Generated from protobuf field float clip_percent_upperbound = 4;

Returns
TypeDescription
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.

Generated from protobuf field float clip_percent_upperbound = 4;

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getClipPercentLowerbound

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

Generated from protobuf field float clip_percent_lowerbound = 5;

Returns
TypeDescription
float

setClipPercentLowerbound

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

Generated from protobuf field float clip_percent_lowerbound = 5;

Parameter
NameDescription
var float
Returns
TypeDescription
$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.

Generated from protobuf field .google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization.OverlayType overlay_type = 6;

Returns
TypeDescription
int

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.

Generated from protobuf field .google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization.OverlayType overlay_type = 6;

Parameter
NameDescription
var int
Returns
TypeDescription
$this