Class FeatureStatsAnomaly (3.31.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.v1.FeatureStatsAnomaly

Static Fields

ANOMALY_DETECTION_THRESHOLD_FIELD_NUMBER

public static final int ANOMALY_DETECTION_THRESHOLD_FIELD_NUMBER
Field Value
TypeDescription
int

ANOMALY_URI_FIELD_NUMBER

public static final int ANOMALY_URI_FIELD_NUMBER
Field Value
TypeDescription
int

DISTRIBUTION_DEVIATION_FIELD_NUMBER

public static final int DISTRIBUTION_DEVIATION_FIELD_NUMBER
Field Value
TypeDescription
int

END_TIME_FIELD_NUMBER

public static final int END_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

SCORE_FIELD_NUMBER

public static final int SCORE_FIELD_NUMBER
Field Value
TypeDescription
int

START_TIME_FIELD_NUMBER

public static final int START_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

STATS_URI_FIELD_NUMBER

public static final int STATS_URI_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static FeatureStatsAnomaly getDefaultInstance()
Returns
TypeDescription
FeatureStatsAnomaly

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static FeatureStatsAnomaly.Builder newBuilder()
Returns
TypeDescription
FeatureStatsAnomaly.Builder

newBuilder(FeatureStatsAnomaly prototype)

public static FeatureStatsAnomaly.Builder newBuilder(FeatureStatsAnomaly prototype)
Parameter
NameDescription
prototypeFeatureStatsAnomaly
Returns
TypeDescription
FeatureStatsAnomaly.Builder

parseDelimitedFrom(InputStream input)

public static FeatureStatsAnomaly parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
FeatureStatsAnomaly
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static FeatureStatsAnomaly parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
FeatureStatsAnomaly
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static FeatureStatsAnomaly parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
FeatureStatsAnomaly
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static FeatureStatsAnomaly parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
FeatureStatsAnomaly
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static FeatureStatsAnomaly parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
FeatureStatsAnomaly
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static FeatureStatsAnomaly parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
FeatureStatsAnomaly
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static FeatureStatsAnomaly parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
FeatureStatsAnomaly
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static FeatureStatsAnomaly parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
FeatureStatsAnomaly
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static FeatureStatsAnomaly parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
FeatureStatsAnomaly
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static FeatureStatsAnomaly parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
FeatureStatsAnomaly
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static FeatureStatsAnomaly parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
FeatureStatsAnomaly
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static FeatureStatsAnomaly parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
FeatureStatsAnomaly
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<FeatureStatsAnomaly> parser()
Returns
TypeDescription
Parser<FeatureStatsAnomaly>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
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
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

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.

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

getParserForType()

public Parser<FeatureStatsAnomaly> getParserForType()
Returns
TypeDescription
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
TypeDescription
double

The score.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
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
TypeDescription
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
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.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public FeatureStatsAnomaly.Builder newBuilderForType()
Returns
TypeDescription
FeatureStatsAnomaly.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected FeatureStatsAnomaly.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
FeatureStatsAnomaly.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public FeatureStatsAnomaly.Builder toBuilder()
Returns
TypeDescription
FeatureStatsAnomaly.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException