Class FeatureStatsAnomaly (3.50.0)

public final class FeatureStatsAnomaly extends GeneratedMessageV3 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 Fields

ANOMALY_DETECTION_THRESHOLD_FIELD_NUMBER

public static final int ANOMALY_DETECTION_THRESHOLD_FIELD_NUMBER
Field Value
Type Description
int

ANOMALY_URI_FIELD_NUMBER

public static final int ANOMALY_URI_FIELD_NUMBER
Field Value
Type Description
int

DISTRIBUTION_DEVIATION_FIELD_NUMBER

public static final int DISTRIBUTION_DEVIATION_FIELD_NUMBER
Field Value
Type Description
int

END_TIME_FIELD_NUMBER

public static final int END_TIME_FIELD_NUMBER
Field Value
Type Description
int

SCORE_FIELD_NUMBER

public static final int SCORE_FIELD_NUMBER
Field Value
Type Description
int

START_TIME_FIELD_NUMBER

public static final int START_TIME_FIELD_NUMBER
Field Value
Type Description
int

STATS_URI_FIELD_NUMBER

public static final int STATS_URI_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static FeatureStatsAnomaly getDefaultInstance()
Returns
Type Description
FeatureStatsAnomaly

getDescriptor()

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

newBuilder()

public static FeatureStatsAnomaly.Builder newBuilder()
Returns
Type Description
FeatureStatsAnomaly.Builder

newBuilder(FeatureStatsAnomaly prototype)

public static FeatureStatsAnomaly.Builder newBuilder(FeatureStatsAnomaly prototype)
Parameter
Name Description
prototype FeatureStatsAnomaly
Returns
Type Description
FeatureStatsAnomaly.Builder

parseDelimitedFrom(InputStream input)

public static FeatureStatsAnomaly parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
FeatureStatsAnomaly
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static FeatureStatsAnomaly parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FeatureStatsAnomaly
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static FeatureStatsAnomaly parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
FeatureStatsAnomaly
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static FeatureStatsAnomaly parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FeatureStatsAnomaly
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static FeatureStatsAnomaly parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
FeatureStatsAnomaly
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static FeatureStatsAnomaly parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FeatureStatsAnomaly
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static FeatureStatsAnomaly parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
FeatureStatsAnomaly
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static FeatureStatsAnomaly parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FeatureStatsAnomaly
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static FeatureStatsAnomaly parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
FeatureStatsAnomaly
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static FeatureStatsAnomaly parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FeatureStatsAnomaly
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static FeatureStatsAnomaly parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
FeatureStatsAnomaly
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static FeatureStatsAnomaly parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FeatureStatsAnomaly
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<FeatureStatsAnomaly> parser()
Returns
Type Description
Parser<FeatureStatsAnomaly>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
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

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.

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

getParserForType()

public Parser<FeatureStatsAnomaly> getParserForType()
Returns
Type Description
Parser<FeatureStatsAnomaly>
Overrides

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.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public FeatureStatsAnomaly.Builder newBuilderForType()
Returns
Type Description
FeatureStatsAnomaly.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected FeatureStatsAnomaly.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
FeatureStatsAnomaly.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public FeatureStatsAnomaly.Builder toBuilder()
Returns
Type Description
FeatureStatsAnomaly.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException