Class ExplanationMetadata.InputMetadata.Visualization.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<ExplanationMetadata.InputMetadata.Visualization.Builder>
com.google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization.Builder
All Implemented Interfaces:
ExplanationMetadata.InputMetadata.VisualizationOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
ExplanationMetadata.InputMetadata.Visualization

public static final class ExplanationMetadata.InputMetadata.Visualization.Builder extends com.google.protobuf.GeneratedMessage.Builder<ExplanationMetadata.InputMetadata.Visualization.Builder> implements ExplanationMetadata.InputMetadata.VisualizationOrBuilder
 Visualization configurations for image explanation.
 
Protobuf type google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<ExplanationMetadata.InputMetadata.Visualization.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<ExplanationMetadata.InputMetadata.Visualization.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<ExplanationMetadata.InputMetadata.Visualization.Builder>
    • getDefaultInstanceForType

      public ExplanationMetadata.InputMetadata.Visualization getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public ExplanationMetadata.InputMetadata.Visualization.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ExplanationMetadata.InputMetadata.Visualization.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<ExplanationMetadata.InputMetadata.Visualization.Builder>
    • mergeFrom

      public ExplanationMetadata.InputMetadata.Visualization.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ExplanationMetadata.InputMetadata.Visualization.Builder>
      Throws:
      IOException
    • getTypeValue

      public int getTypeValue()
       Type of the image visualization. Only applicable to
       [Integrated Gradients
       attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
       OUTLINES shows regions of attribution, while PIXELS shows per-pixel
       attribution. Defaults to OUTLINES.
       
      .google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization.Type type = 1;
      Specified by:
      getTypeValue in interface ExplanationMetadata.InputMetadata.VisualizationOrBuilder
      Returns:
      The enum numeric value on the wire for type.
    • setTypeValue

       Type of the image visualization. Only applicable to
       [Integrated Gradients
       attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
       OUTLINES shows regions of attribution, while PIXELS shows per-pixel
       attribution. Defaults to OUTLINES.
       
      .google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization.Type type = 1;
      Parameters:
      value - The enum numeric value on the wire for type to set.
      Returns:
      This builder for chaining.
    • getType

       Type of the image visualization. Only applicable to
       [Integrated Gradients
       attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
       OUTLINES shows regions of attribution, while PIXELS shows per-pixel
       attribution. Defaults to OUTLINES.
       
      .google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization.Type type = 1;
      Specified by:
      getType in interface ExplanationMetadata.InputMetadata.VisualizationOrBuilder
      Returns:
      The type.
    • setType

       Type of the image visualization. Only applicable to
       [Integrated Gradients
       attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
       OUTLINES shows regions of attribution, while PIXELS shows per-pixel
       attribution. Defaults to OUTLINES.
       
      .google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization.Type type = 1;
      Parameters:
      value - The type to set.
      Returns:
      This builder for chaining.
    • clearType

       Type of the image visualization. Only applicable to
       [Integrated Gradients
       attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
       OUTLINES shows regions of attribution, while PIXELS shows per-pixel
       attribution. Defaults to OUTLINES.
       
      .google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization.Type type = 1;
      Returns:
      This builder for chaining.
    • getPolarityValue

      public int getPolarityValue()
       Whether to only highlight pixels with positive contributions, negative
       or both. Defaults to POSITIVE.
       
      .google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization.Polarity polarity = 2;
      Specified by:
      getPolarityValue in interface ExplanationMetadata.InputMetadata.VisualizationOrBuilder
      Returns:
      The enum numeric value on the wire for polarity.
    • setPolarityValue

      public ExplanationMetadata.InputMetadata.Visualization.Builder setPolarityValue(int value)
       Whether to only highlight pixels with positive contributions, negative
       or both. Defaults to POSITIVE.
       
      .google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization.Polarity polarity = 2;
      Parameters:
      value - The enum numeric value on the wire for polarity to set.
      Returns:
      This builder for chaining.
    • getPolarity

       Whether to only highlight pixels with positive contributions, negative
       or both. Defaults to POSITIVE.
       
      .google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization.Polarity polarity = 2;
      Specified by:
      getPolarity in interface ExplanationMetadata.InputMetadata.VisualizationOrBuilder
      Returns:
      The polarity.
    • setPolarity

       Whether to only highlight pixels with positive contributions, negative
       or both. Defaults to POSITIVE.
       
      .google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization.Polarity polarity = 2;
      Parameters:
      value - The polarity to set.
      Returns:
      This builder for chaining.
    • clearPolarity

       Whether to only highlight pixels with positive contributions, negative
       or both. Defaults to POSITIVE.
       
      .google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization.Polarity polarity = 2;
      Returns:
      This builder for chaining.
    • getColorMapValue

      public int getColorMapValue()
       The color scheme used for the highlighted areas.
      
       Defaults to PINK_GREEN for
       [Integrated Gradients
       attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution],
       which shows positive attributions in green and negative in pink.
      
       Defaults to VIRIDIS for
       [XRAI
       attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution],
       which highlights the most influential regions in yellow and the least
       influential in blue.
       
      .google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization.ColorMap color_map = 3;
      Specified by:
      getColorMapValue in interface ExplanationMetadata.InputMetadata.VisualizationOrBuilder
      Returns:
      The enum numeric value on the wire for colorMap.
    • setColorMapValue

      public ExplanationMetadata.InputMetadata.Visualization.Builder setColorMapValue(int value)
       The color scheme used for the highlighted areas.
      
       Defaults to PINK_GREEN for
       [Integrated Gradients
       attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution],
       which shows positive attributions in green and negative in pink.
      
       Defaults to VIRIDIS for
       [XRAI
       attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution],
       which highlights the most influential regions in yellow and the least
       influential in blue.
       
      .google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization.ColorMap color_map = 3;
      Parameters:
      value - The enum numeric value on the wire for colorMap to set.
      Returns:
      This builder for chaining.
    • getColorMap

       The color scheme used for the highlighted areas.
      
       Defaults to PINK_GREEN for
       [Integrated Gradients
       attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution],
       which shows positive attributions in green and negative in pink.
      
       Defaults to VIRIDIS for
       [XRAI
       attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution],
       which highlights the most influential regions in yellow and the least
       influential in blue.
       
      .google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization.ColorMap color_map = 3;
      Specified by:
      getColorMap in interface ExplanationMetadata.InputMetadata.VisualizationOrBuilder
      Returns:
      The colorMap.
    • setColorMap

       The color scheme used for the highlighted areas.
      
       Defaults to PINK_GREEN for
       [Integrated Gradients
       attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution],
       which shows positive attributions in green and negative in pink.
      
       Defaults to VIRIDIS for
       [XRAI
       attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution],
       which highlights the most influential regions in yellow and the least
       influential in blue.
       
      .google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization.ColorMap color_map = 3;
      Parameters:
      value - The colorMap to set.
      Returns:
      This builder for chaining.
    • clearColorMap

       The color scheme used for the highlighted areas.
      
       Defaults to PINK_GREEN for
       [Integrated Gradients
       attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution],
       which shows positive attributions in green and negative in pink.
      
       Defaults to VIRIDIS for
       [XRAI
       attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution],
       which highlights the most influential regions in yellow and the least
       influential in blue.
       
      .google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization.ColorMap color_map = 3;
      Returns:
      This builder for chaining.
    • getClipPercentUpperbound

      public float 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.
       
      float clip_percent_upperbound = 4;
      Specified by:
      getClipPercentUpperbound in interface ExplanationMetadata.InputMetadata.VisualizationOrBuilder
      Returns:
      The clipPercentUpperbound.
    • setClipPercentUpperbound

      public ExplanationMetadata.InputMetadata.Visualization.Builder setClipPercentUpperbound(float value)
       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.
       
      float clip_percent_upperbound = 4;
      Parameters:
      value - The clipPercentUpperbound to set.
      Returns:
      This builder for chaining.
    • clearClipPercentUpperbound

      public ExplanationMetadata.InputMetadata.Visualization.Builder clearClipPercentUpperbound()
       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.
       
      float clip_percent_upperbound = 4;
      Returns:
      This builder for chaining.
    • getClipPercentLowerbound

      public float getClipPercentLowerbound()
       Excludes attributions below the specified percentile, from the
       highlighted areas. Defaults to 62.
       
      float clip_percent_lowerbound = 5;
      Specified by:
      getClipPercentLowerbound in interface ExplanationMetadata.InputMetadata.VisualizationOrBuilder
      Returns:
      The clipPercentLowerbound.
    • setClipPercentLowerbound

      public ExplanationMetadata.InputMetadata.Visualization.Builder setClipPercentLowerbound(float value)
       Excludes attributions below the specified percentile, from the
       highlighted areas. Defaults to 62.
       
      float clip_percent_lowerbound = 5;
      Parameters:
      value - The clipPercentLowerbound to set.
      Returns:
      This builder for chaining.
    • clearClipPercentLowerbound

      public ExplanationMetadata.InputMetadata.Visualization.Builder clearClipPercentLowerbound()
       Excludes attributions below the specified percentile, from the
       highlighted areas. Defaults to 62.
       
      float clip_percent_lowerbound = 5;
      Returns:
      This builder for chaining.
    • getOverlayTypeValue

      public int getOverlayTypeValue()
       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.
       
      .google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization.OverlayType overlay_type = 6;
      Specified by:
      getOverlayTypeValue in interface ExplanationMetadata.InputMetadata.VisualizationOrBuilder
      Returns:
      The enum numeric value on the wire for overlayType.
    • setOverlayTypeValue

      public ExplanationMetadata.InputMetadata.Visualization.Builder setOverlayTypeValue(int value)
       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.
       
      .google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization.OverlayType overlay_type = 6;
      Parameters:
      value - The enum numeric value on the wire for overlayType to set.
      Returns:
      This builder for chaining.
    • 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.
       
      .google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization.OverlayType overlay_type = 6;
      Specified by:
      getOverlayType in interface ExplanationMetadata.InputMetadata.VisualizationOrBuilder
      Returns:
      The 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.
       
      .google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization.OverlayType overlay_type = 6;
      Parameters:
      value - The overlayType to set.
      Returns:
      This builder for chaining.
    • clearOverlayType

       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.
       
      .google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization.OverlayType overlay_type = 6;
      Returns:
      This builder for chaining.