Class FeatureStatsAnomaly.Builder (3.21.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public FeatureStatsAnomaly.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
FeatureStatsAnomaly.Builder
Overrides

build()

public FeatureStatsAnomaly build()
Returns
TypeDescription
FeatureStatsAnomaly

buildPartial()

public FeatureStatsAnomaly buildPartial()
Returns
TypeDescription
FeatureStatsAnomaly

clear()

public FeatureStatsAnomaly.Builder clear()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
FeatureStatsAnomaly.Builder

clearField(Descriptors.FieldDescriptor field)

public FeatureStatsAnomaly.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
FeatureStatsAnomaly.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public FeatureStatsAnomaly.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
FeatureStatsAnomaly.Builder

This builder for chaining.

clone()

public FeatureStatsAnomaly.Builder clone()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for anomalyUri.

getDefaultInstanceForType()

public FeatureStatsAnomaly getDefaultInstanceForType()
Returns
TypeDescription
FeatureStatsAnomaly

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the startTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
FeatureStatsAnomaly.Builder

mergeFrom(FeatureStatsAnomaly other)

public FeatureStatsAnomaly.Builder mergeFrom(FeatureStatsAnomaly other)
Parameter
NameDescription
otherFeatureStatsAnomaly
Returns
TypeDescription
FeatureStatsAnomaly.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public FeatureStatsAnomaly.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
FeatureStatsAnomaly.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public FeatureStatsAnomaly.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
FeatureStatsAnomaly.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final FeatureStatsAnomaly.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valuedouble

The anomalyDetectionThreshold to set.

Returns
TypeDescription
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
NameDescription
valueString

The anomalyUri to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for anomalyUri to set.

Returns
TypeDescription
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
NameDescription
valuedouble

The distributionDeviation to set.

Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
FeatureStatsAnomaly.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public FeatureStatsAnomaly.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
FeatureStatsAnomaly.Builder
Overrides

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

public FeatureStatsAnomaly.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valuedouble

The score to set.

Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
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
NameDescription
valueString

The statsUri to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for statsUri to set.

Returns
TypeDescription
FeatureStatsAnomaly.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final FeatureStatsAnomaly.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
FeatureStatsAnomaly.Builder
Overrides