Class FeatureStatsAnomaly.Builder (3.44.0)

public static final class FeatureStatsAnomaly.Builder extends GeneratedMessageV3.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.v1beta1.FeatureStatsAnomaly

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public FeatureStatsAnomaly.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
FeatureStatsAnomaly.Builder
Overrides

build()

public FeatureStatsAnomaly build()
Returns
Type Description
FeatureStatsAnomaly

buildPartial()

public FeatureStatsAnomaly buildPartial()
Returns
Type Description
FeatureStatsAnomaly

clear()

public FeatureStatsAnomaly.Builder clear()
Returns
Type Description
FeatureStatsAnomaly.Builder
Overrides

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.

double anomaly_detection_threshold = 9;

Returns
Type Description
FeatureStatsAnomaly.Builder

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.

string anomaly_uri = 4;

Returns
Type Description
FeatureStatsAnomaly.Builder

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
Type Description
FeatureStatsAnomaly.Builder

This builder for chaining.

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;

Returns
Type Description
FeatureStatsAnomaly.Builder

clearField(Descriptors.FieldDescriptor field)

public FeatureStatsAnomaly.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
FeatureStatsAnomaly.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public FeatureStatsAnomaly.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
FeatureStatsAnomaly.Builder
Overrides

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 and ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_DRIFT.

double score = 1;

Returns
Type Description
FeatureStatsAnomaly.Builder

This builder for chaining.

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;

Returns
Type Description
FeatureStatsAnomaly.Builder

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.

string stats_uri = 3;

Returns
Type Description
FeatureStatsAnomaly.Builder

This builder for chaining.

clone()

public FeatureStatsAnomaly.Builder clone()
Returns
Type Description
FeatureStatsAnomaly.Builder
Overrides

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.

double anomaly_detection_threshold = 9;

Returns
Type Description
double

The anomalyDetectionThreshold.

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.

string anomaly_uri = 4;

Returns
Type Description
String

The anomalyUri.

getAnomalyUriBytes()

public 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.

string anomaly_uri = 4;

Returns
Type Description
ByteString

The bytes for anomalyUri.

getDefaultInstanceForType()

public FeatureStatsAnomaly getDefaultInstanceForType()
Returns
Type Description
FeatureStatsAnomaly

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

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;

Returns
Type Description
double

The distributionDeviation.

getEndTime()

public 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;

Returns
Type Description
Timestamp

The endTime.

getEndTimeBuilder()

public 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;

Returns
Type Description
Builder

getEndTimeOrBuilder()

public 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;

Returns
Type Description
TimestampOrBuilder

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 and ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_DRIFT.

double score = 1;

Returns
Type Description
double

The score.

getStartTime()

public 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;

Returns
Type Description
Timestamp

The startTime.

getStartTimeBuilder()

public 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;

Returns
Type Description
Builder

getStartTimeOrBuilder()

public 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;

Returns
Type Description
TimestampOrBuilder

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.

string stats_uri = 3;

Returns
Type Description
String

The statsUri.

getStatsUriBytes()

public 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.

string stats_uri = 3;

Returns
Type Description
ByteString

The bytes for statsUri.

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;

Returns
Type Description
boolean

Whether the endTime field is set.

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;

Returns
Type Description
boolean

Whether the startTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeEndTime(Timestamp value)

public FeatureStatsAnomaly.Builder mergeEndTime(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;

Parameter
Name Description
value Timestamp
Returns
Type Description
FeatureStatsAnomaly.Builder

mergeFrom(FeatureStatsAnomaly other)

public FeatureStatsAnomaly.Builder mergeFrom(FeatureStatsAnomaly other)
Parameter
Name Description
other FeatureStatsAnomaly
Returns
Type Description
FeatureStatsAnomaly.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public FeatureStatsAnomaly.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FeatureStatsAnomaly.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public FeatureStatsAnomaly.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
FeatureStatsAnomaly.Builder
Overrides

mergeStartTime(Timestamp value)

public FeatureStatsAnomaly.Builder mergeStartTime(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;

Parameter
Name Description
value Timestamp
Returns
Type Description
FeatureStatsAnomaly.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final FeatureStatsAnomaly.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
FeatureStatsAnomaly.Builder
Overrides

setAnomalyDetectionThreshold(double value)

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.

double anomaly_detection_threshold = 9;

Parameter
Name Description
value double

The anomalyDetectionThreshold to set.

Returns
Type Description
FeatureStatsAnomaly.Builder

This builder for chaining.

setAnomalyUri(String value)

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.

string anomaly_uri = 4;

Parameter
Name Description
value String

The anomalyUri to set.

Returns
Type Description
FeatureStatsAnomaly.Builder

This builder for chaining.

setAnomalyUriBytes(ByteString value)

public FeatureStatsAnomaly.Builder setAnomalyUriBytes(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.

string anomaly_uri = 4;

Parameter
Name Description
value ByteString

The bytes for anomalyUri to set.

Returns
Type Description
FeatureStatsAnomaly.Builder

This builder for chaining.

setDistributionDeviation(double value)

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;

Parameter
Name Description
value double

The distributionDeviation to set.

Returns
Type Description
FeatureStatsAnomaly.Builder

This builder for chaining.

setEndTime(Timestamp value)

public FeatureStatsAnomaly.Builder setEndTime(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;

Parameter
Name Description
value Timestamp
Returns
Type Description
FeatureStatsAnomaly.Builder

setEndTime(Timestamp.Builder builderForValue)

public FeatureStatsAnomaly.Builder setEndTime(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;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
FeatureStatsAnomaly.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public FeatureStatsAnomaly.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
FeatureStatsAnomaly.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public FeatureStatsAnomaly.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
FeatureStatsAnomaly.Builder
Overrides

setScore(double value)

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 and ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_DRIFT.

double score = 1;

Parameter
Name Description
value double

The score to set.

Returns
Type Description
FeatureStatsAnomaly.Builder

This builder for chaining.

setStartTime(Timestamp value)

public FeatureStatsAnomaly.Builder setStartTime(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;

Parameter
Name Description
value Timestamp
Returns
Type Description
FeatureStatsAnomaly.Builder

setStartTime(Timestamp.Builder builderForValue)

public FeatureStatsAnomaly.Builder setStartTime(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;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
FeatureStatsAnomaly.Builder

setStatsUri(String value)

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.

string stats_uri = 3;

Parameter
Name Description
value String

The statsUri to set.

Returns
Type Description
FeatureStatsAnomaly.Builder

This builder for chaining.

setStatsUriBytes(ByteString value)

public FeatureStatsAnomaly.Builder setStatsUriBytes(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.

string stats_uri = 3;

Parameter
Name Description
value ByteString

The bytes for statsUri to set.

Returns
Type Description
FeatureStatsAnomaly.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final FeatureStatsAnomaly.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
FeatureStatsAnomaly.Builder
Overrides