Class FeatureStatsAnomaly.Builder

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

public static final class FeatureStatsAnomaly.Builder extends com.google.protobuf.GeneratedMessage.Builder<FeatureStatsAnomaly.Builder> implements FeatureStatsAnomalyOrBuilder
 Stats and Anomaly generated at specific timestamp for specific Feature.
 The start_time and end_time are used to define the time range of the dataset
 that current stats belongs to, e.g. prediction traffic is bucketed into
 prediction datasets by time window. If the Dataset is not defined by time
 window, start_time = end_time. Timestamp of the stats and anomalies always
 refers to end_time. Raw stats and anomalies are stored in stats_uri or
 anomaly_uri in the tensorflow defined protos. Field data_stats contains
 almost identical information with the raw stats in Vertex AI
 defined proto, for UI to display.
 
Protobuf type google.cloud.aiplatform.v1.FeatureStatsAnomaly
  • 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<FeatureStatsAnomaly.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<FeatureStatsAnomaly.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<FeatureStatsAnomaly.Builder>
    • getDefaultInstanceForType

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

      public FeatureStatsAnomaly build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public FeatureStatsAnomaly buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public FeatureStatsAnomaly.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<FeatureStatsAnomaly.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<FeatureStatsAnomaly.Builder>
    • mergeFrom

      public FeatureStatsAnomaly.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<FeatureStatsAnomaly.Builder>
      Throws:
      IOException
    • getScore

      public double getScore()
       Feature importance score, only populated when cross-feature monitoring is
       enabled. For now only used to represent feature attribution score within
       range [0, 1] for
       [ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_SKEW][google.cloud.aiplatform.v1.ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_SKEW]
       and
       [ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_DRIFT][google.cloud.aiplatform.v1.ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_DRIFT].
       
      double score = 1;
      Specified by:
      getScore in interface FeatureStatsAnomalyOrBuilder
      Returns:
      The score.
    • setScore

      public FeatureStatsAnomaly.Builder setScore(double value)
       Feature importance score, only populated when cross-feature monitoring is
       enabled. For now only used to represent feature attribution score within
       range [0, 1] for
       [ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_SKEW][google.cloud.aiplatform.v1.ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_SKEW]
       and
       [ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_DRIFT][google.cloud.aiplatform.v1.ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_DRIFT].
       
      double score = 1;
      Parameters:
      value - The score to set.
      Returns:
      This builder for chaining.
    • clearScore

      public FeatureStatsAnomaly.Builder clearScore()
       Feature importance score, only populated when cross-feature monitoring is
       enabled. For now only used to represent feature attribution score within
       range [0, 1] for
       [ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_SKEW][google.cloud.aiplatform.v1.ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_SKEW]
       and
       [ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_DRIFT][google.cloud.aiplatform.v1.ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_DRIFT].
       
      double score = 1;
      Returns:
      This builder for chaining.
    • getStatsUri

      public String getStatsUri()
       Path of the stats file for current feature values in Cloud Storage bucket.
       Format: gs://<bucket_name>/<object_name>/stats.
       Example: gs://monitoring_bucket/feature_name/stats.
       Stats are stored as binary format with Protobuf message
       [tensorflow.metadata.v0.FeatureNameStatistics](https://github.com/tensorflow/metadata/blob/master/tensorflow_metadata/proto/v0/statistics.proto).
       
      string stats_uri = 3;
      Specified by:
      getStatsUri in interface FeatureStatsAnomalyOrBuilder
      Returns:
      The statsUri.
    • getStatsUriBytes

      public com.google.protobuf.ByteString getStatsUriBytes()
       Path of the stats file for current feature values in Cloud Storage bucket.
       Format: gs://<bucket_name>/<object_name>/stats.
       Example: gs://monitoring_bucket/feature_name/stats.
       Stats are stored as binary format with Protobuf message
       [tensorflow.metadata.v0.FeatureNameStatistics](https://github.com/tensorflow/metadata/blob/master/tensorflow_metadata/proto/v0/statistics.proto).
       
      string stats_uri = 3;
      Specified by:
      getStatsUriBytes in interface FeatureStatsAnomalyOrBuilder
      Returns:
      The bytes for statsUri.
    • setStatsUri

      public FeatureStatsAnomaly.Builder setStatsUri(String value)
       Path of the stats file for current feature values in Cloud Storage bucket.
       Format: gs://<bucket_name>/<object_name>/stats.
       Example: gs://monitoring_bucket/feature_name/stats.
       Stats are stored as binary format with Protobuf message
       [tensorflow.metadata.v0.FeatureNameStatistics](https://github.com/tensorflow/metadata/blob/master/tensorflow_metadata/proto/v0/statistics.proto).
       
      string stats_uri = 3;
      Parameters:
      value - The statsUri to set.
      Returns:
      This builder for chaining.
    • clearStatsUri

      public FeatureStatsAnomaly.Builder clearStatsUri()
       Path of the stats file for current feature values in Cloud Storage bucket.
       Format: gs://<bucket_name>/<object_name>/stats.
       Example: gs://monitoring_bucket/feature_name/stats.
       Stats are stored as binary format with Protobuf message
       [tensorflow.metadata.v0.FeatureNameStatistics](https://github.com/tensorflow/metadata/blob/master/tensorflow_metadata/proto/v0/statistics.proto).
       
      string stats_uri = 3;
      Returns:
      This builder for chaining.
    • setStatsUriBytes

      public FeatureStatsAnomaly.Builder setStatsUriBytes(com.google.protobuf.ByteString value)
       Path of the stats file for current feature values in Cloud Storage bucket.
       Format: gs://<bucket_name>/<object_name>/stats.
       Example: gs://monitoring_bucket/feature_name/stats.
       Stats are stored as binary format with Protobuf message
       [tensorflow.metadata.v0.FeatureNameStatistics](https://github.com/tensorflow/metadata/blob/master/tensorflow_metadata/proto/v0/statistics.proto).
       
      string stats_uri = 3;
      Parameters:
      value - The bytes for statsUri to set.
      Returns:
      This builder for chaining.
    • getAnomalyUri

      public String getAnomalyUri()
       Path of the anomaly file for current feature values in Cloud Storage
       bucket.
       Format: gs://<bucket_name>/<object_name>/anomalies.
       Example: gs://monitoring_bucket/feature_name/anomalies.
       Stats are stored as binary format with Protobuf message
       Anoamlies are stored as binary format with Protobuf message
       [tensorflow.metadata.v0.AnomalyInfo]
       (https://github.com/tensorflow/metadata/blob/master/tensorflow_metadata/proto/v0/anomalies.proto).
       
      string anomaly_uri = 4;
      Specified by:
      getAnomalyUri in interface FeatureStatsAnomalyOrBuilder
      Returns:
      The anomalyUri.
    • getAnomalyUriBytes

      public com.google.protobuf.ByteString getAnomalyUriBytes()
       Path of the anomaly file for current feature values in Cloud Storage
       bucket.
       Format: gs://<bucket_name>/<object_name>/anomalies.
       Example: gs://monitoring_bucket/feature_name/anomalies.
       Stats are stored as binary format with Protobuf message
       Anoamlies are stored as binary format with Protobuf message
       [tensorflow.metadata.v0.AnomalyInfo]
       (https://github.com/tensorflow/metadata/blob/master/tensorflow_metadata/proto/v0/anomalies.proto).
       
      string anomaly_uri = 4;
      Specified by:
      getAnomalyUriBytes in interface FeatureStatsAnomalyOrBuilder
      Returns:
      The bytes for anomalyUri.
    • setAnomalyUri

      public FeatureStatsAnomaly.Builder setAnomalyUri(String value)
       Path of the anomaly file for current feature values in Cloud Storage
       bucket.
       Format: gs://<bucket_name>/<object_name>/anomalies.
       Example: gs://monitoring_bucket/feature_name/anomalies.
       Stats are stored as binary format with Protobuf message
       Anoamlies are stored as binary format with Protobuf message
       [tensorflow.metadata.v0.AnomalyInfo]
       (https://github.com/tensorflow/metadata/blob/master/tensorflow_metadata/proto/v0/anomalies.proto).
       
      string anomaly_uri = 4;
      Parameters:
      value - The anomalyUri to set.
      Returns:
      This builder for chaining.
    • clearAnomalyUri

      public FeatureStatsAnomaly.Builder clearAnomalyUri()
       Path of the anomaly file for current feature values in Cloud Storage
       bucket.
       Format: gs://<bucket_name>/<object_name>/anomalies.
       Example: gs://monitoring_bucket/feature_name/anomalies.
       Stats are stored as binary format with Protobuf message
       Anoamlies are stored as binary format with Protobuf message
       [tensorflow.metadata.v0.AnomalyInfo]
       (https://github.com/tensorflow/metadata/blob/master/tensorflow_metadata/proto/v0/anomalies.proto).
       
      string anomaly_uri = 4;
      Returns:
      This builder for chaining.
    • setAnomalyUriBytes

      public FeatureStatsAnomaly.Builder setAnomalyUriBytes(com.google.protobuf.ByteString value)
       Path of the anomaly file for current feature values in Cloud Storage
       bucket.
       Format: gs://<bucket_name>/<object_name>/anomalies.
       Example: gs://monitoring_bucket/feature_name/anomalies.
       Stats are stored as binary format with Protobuf message
       Anoamlies are stored as binary format with Protobuf message
       [tensorflow.metadata.v0.AnomalyInfo]
       (https://github.com/tensorflow/metadata/blob/master/tensorflow_metadata/proto/v0/anomalies.proto).
       
      string anomaly_uri = 4;
      Parameters:
      value - The bytes for anomalyUri to set.
      Returns:
      This builder for chaining.
    • getDistributionDeviation

      public double getDistributionDeviation()
       Deviation from the current stats to baseline stats.
       1. For categorical feature, the distribution distance is calculated by
       L-inifinity norm.
       2. For numerical feature, the distribution distance is calculated by
       Jensen–Shannon divergence.
       
      double distribution_deviation = 5;
      Specified by:
      getDistributionDeviation in interface FeatureStatsAnomalyOrBuilder
      Returns:
      The distributionDeviation.
    • setDistributionDeviation

      public FeatureStatsAnomaly.Builder setDistributionDeviation(double value)
       Deviation from the current stats to baseline stats.
       1. For categorical feature, the distribution distance is calculated by
       L-inifinity norm.
       2. For numerical feature, the distribution distance is calculated by
       Jensen–Shannon divergence.
       
      double distribution_deviation = 5;
      Parameters:
      value - The distributionDeviation to set.
      Returns:
      This builder for chaining.
    • clearDistributionDeviation

      public FeatureStatsAnomaly.Builder clearDistributionDeviation()
       Deviation from the current stats to baseline stats.
       1. For categorical feature, the distribution distance is calculated by
       L-inifinity norm.
       2. For numerical feature, the distribution distance is calculated by
       Jensen–Shannon divergence.
       
      double distribution_deviation = 5;
      Returns:
      This builder for chaining.
    • getAnomalyDetectionThreshold

      public double getAnomalyDetectionThreshold()
       This is the threshold used when detecting anomalies.
       The threshold can be changed by user, so this one might be different from
       [ThresholdConfig.value][google.cloud.aiplatform.v1.ThresholdConfig.value].
       
      double anomaly_detection_threshold = 9;
      Specified by:
      getAnomalyDetectionThreshold in interface FeatureStatsAnomalyOrBuilder
      Returns:
      The anomalyDetectionThreshold.
    • setAnomalyDetectionThreshold

      public FeatureStatsAnomaly.Builder setAnomalyDetectionThreshold(double value)
       This is the threshold used when detecting anomalies.
       The threshold can be changed by user, so this one might be different from
       [ThresholdConfig.value][google.cloud.aiplatform.v1.ThresholdConfig.value].
       
      double anomaly_detection_threshold = 9;
      Parameters:
      value - The anomalyDetectionThreshold to set.
      Returns:
      This builder for chaining.
    • clearAnomalyDetectionThreshold

      public FeatureStatsAnomaly.Builder clearAnomalyDetectionThreshold()
       This is the threshold used when detecting anomalies.
       The threshold can be changed by user, so this one might be different from
       [ThresholdConfig.value][google.cloud.aiplatform.v1.ThresholdConfig.value].
       
      double anomaly_detection_threshold = 9;
      Returns:
      This builder for chaining.
    • hasStartTime

      public boolean hasStartTime()
       The start timestamp of window where stats were generated.
       For objectives where time window doesn't make sense (e.g. Featurestore
       Snapshot Monitoring), start_time is only used to indicate the monitoring
       intervals, so it always equals to (end_time - monitoring_interval).
       
      .google.protobuf.Timestamp start_time = 7;
      Specified by:
      hasStartTime in interface FeatureStatsAnomalyOrBuilder
      Returns:
      Whether the startTime field is set.
    • getStartTime

      public com.google.protobuf.Timestamp getStartTime()
       The start timestamp of window where stats were generated.
       For objectives where time window doesn't make sense (e.g. Featurestore
       Snapshot Monitoring), start_time is only used to indicate the monitoring
       intervals, so it always equals to (end_time - monitoring_interval).
       
      .google.protobuf.Timestamp start_time = 7;
      Specified by:
      getStartTime in interface FeatureStatsAnomalyOrBuilder
      Returns:
      The startTime.
    • setStartTime

      public FeatureStatsAnomaly.Builder setStartTime(com.google.protobuf.Timestamp value)
       The start timestamp of window where stats were generated.
       For objectives where time window doesn't make sense (e.g. Featurestore
       Snapshot Monitoring), start_time is only used to indicate the monitoring
       intervals, so it always equals to (end_time - monitoring_interval).
       
      .google.protobuf.Timestamp start_time = 7;
    • setStartTime

      public FeatureStatsAnomaly.Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue)
       The start timestamp of window where stats were generated.
       For objectives where time window doesn't make sense (e.g. Featurestore
       Snapshot Monitoring), start_time is only used to indicate the monitoring
       intervals, so it always equals to (end_time - monitoring_interval).
       
      .google.protobuf.Timestamp start_time = 7;
    • mergeStartTime

      public FeatureStatsAnomaly.Builder mergeStartTime(com.google.protobuf.Timestamp value)
       The start timestamp of window where stats were generated.
       For objectives where time window doesn't make sense (e.g. Featurestore
       Snapshot Monitoring), start_time is only used to indicate the monitoring
       intervals, so it always equals to (end_time - monitoring_interval).
       
      .google.protobuf.Timestamp start_time = 7;
    • clearStartTime

      public FeatureStatsAnomaly.Builder clearStartTime()
       The start timestamp of window where stats were generated.
       For objectives where time window doesn't make sense (e.g. Featurestore
       Snapshot Monitoring), start_time is only used to indicate the monitoring
       intervals, so it always equals to (end_time - monitoring_interval).
       
      .google.protobuf.Timestamp start_time = 7;
    • getStartTimeBuilder

      public com.google.protobuf.Timestamp.Builder getStartTimeBuilder()
       The start timestamp of window where stats were generated.
       For objectives where time window doesn't make sense (e.g. Featurestore
       Snapshot Monitoring), start_time is only used to indicate the monitoring
       intervals, so it always equals to (end_time - monitoring_interval).
       
      .google.protobuf.Timestamp start_time = 7;
    • getStartTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder()
       The start timestamp of window where stats were generated.
       For objectives where time window doesn't make sense (e.g. Featurestore
       Snapshot Monitoring), start_time is only used to indicate the monitoring
       intervals, so it always equals to (end_time - monitoring_interval).
       
      .google.protobuf.Timestamp start_time = 7;
      Specified by:
      getStartTimeOrBuilder in interface FeatureStatsAnomalyOrBuilder
    • hasEndTime

      public boolean hasEndTime()
       The end timestamp of window where stats were generated.
       For objectives where time window doesn't make sense (e.g. Featurestore
       Snapshot Monitoring), end_time indicates the timestamp of the data used to
       generate stats (e.g. timestamp we take snapshots for feature values).
       
      .google.protobuf.Timestamp end_time = 8;
      Specified by:
      hasEndTime in interface FeatureStatsAnomalyOrBuilder
      Returns:
      Whether the endTime field is set.
    • getEndTime

      public com.google.protobuf.Timestamp getEndTime()
       The end timestamp of window where stats were generated.
       For objectives where time window doesn't make sense (e.g. Featurestore
       Snapshot Monitoring), end_time indicates the timestamp of the data used to
       generate stats (e.g. timestamp we take snapshots for feature values).
       
      .google.protobuf.Timestamp end_time = 8;
      Specified by:
      getEndTime in interface FeatureStatsAnomalyOrBuilder
      Returns:
      The endTime.
    • setEndTime

      public FeatureStatsAnomaly.Builder setEndTime(com.google.protobuf.Timestamp value)
       The end timestamp of window where stats were generated.
       For objectives where time window doesn't make sense (e.g. Featurestore
       Snapshot Monitoring), end_time indicates the timestamp of the data used to
       generate stats (e.g. timestamp we take snapshots for feature values).
       
      .google.protobuf.Timestamp end_time = 8;
    • setEndTime

      public FeatureStatsAnomaly.Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue)
       The end timestamp of window where stats were generated.
       For objectives where time window doesn't make sense (e.g. Featurestore
       Snapshot Monitoring), end_time indicates the timestamp of the data used to
       generate stats (e.g. timestamp we take snapshots for feature values).
       
      .google.protobuf.Timestamp end_time = 8;
    • mergeEndTime

      public FeatureStatsAnomaly.Builder mergeEndTime(com.google.protobuf.Timestamp value)
       The end timestamp of window where stats were generated.
       For objectives where time window doesn't make sense (e.g. Featurestore
       Snapshot Monitoring), end_time indicates the timestamp of the data used to
       generate stats (e.g. timestamp we take snapshots for feature values).
       
      .google.protobuf.Timestamp end_time = 8;
    • clearEndTime

      public FeatureStatsAnomaly.Builder clearEndTime()
       The end timestamp of window where stats were generated.
       For objectives where time window doesn't make sense (e.g. Featurestore
       Snapshot Monitoring), end_time indicates the timestamp of the data used to
       generate stats (e.g. timestamp we take snapshots for feature values).
       
      .google.protobuf.Timestamp end_time = 8;
    • getEndTimeBuilder

      public com.google.protobuf.Timestamp.Builder getEndTimeBuilder()
       The end timestamp of window where stats were generated.
       For objectives where time window doesn't make sense (e.g. Featurestore
       Snapshot Monitoring), end_time indicates the timestamp of the data used to
       generate stats (e.g. timestamp we take snapshots for feature values).
       
      .google.protobuf.Timestamp end_time = 8;
    • getEndTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder()
       The end timestamp of window where stats were generated.
       For objectives where time window doesn't make sense (e.g. Featurestore
       Snapshot Monitoring), end_time indicates the timestamp of the data used to
       generate stats (e.g. timestamp we take snapshots for feature values).
       
      .google.protobuf.Timestamp end_time = 8;
      Specified by:
      getEndTimeOrBuilder in interface FeatureStatsAnomalyOrBuilder