Class ModelEvaluation.BiasConfig (3.55.0)

public static final class ModelEvaluation.BiasConfig extends GeneratedMessageV3 implements ModelEvaluation.BiasConfigOrBuilder

Configuration for bias detection.

Protobuf type google.cloud.aiplatform.v1beta1.ModelEvaluation.BiasConfig

Static Fields

BIAS_SLICES_FIELD_NUMBER

public static final int BIAS_SLICES_FIELD_NUMBER
Field Value
Type Description
int

LABELS_FIELD_NUMBER

public static final int LABELS_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static ModelEvaluation.BiasConfig getDefaultInstance()
Returns
Type Description
ModelEvaluation.BiasConfig

getDescriptor()

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

newBuilder()

public static ModelEvaluation.BiasConfig.Builder newBuilder()
Returns
Type Description
ModelEvaluation.BiasConfig.Builder

newBuilder(ModelEvaluation.BiasConfig prototype)

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

parseDelimitedFrom(InputStream input)

public static ModelEvaluation.BiasConfig parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ModelEvaluation.BiasConfig
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

public static ModelEvaluation.BiasConfig parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
ModelEvaluation.BiasConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

public static ModelEvaluation.BiasConfig parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
ModelEvaluation.BiasConfig
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

public static ModelEvaluation.BiasConfig parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ModelEvaluation.BiasConfig
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

public static ModelEvaluation.BiasConfig parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
ModelEvaluation.BiasConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

public static Parser<ModelEvaluation.BiasConfig> parser()
Returns
Type Description
Parser<BiasConfig>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getBiasSlices()

public ModelEvaluationSlice.Slice.SliceSpec getBiasSlices()

Specification for how the data should be sliced for bias. It contains a list of slices, with limitation of two slices. The first slice of data will be the slice_a. The second slice in the list (slice_b) will be compared against the first slice. If only a single slice is provided, then slice_a will be compared against "not slice_a". Below are examples with feature "education" with value "low", "medium", "high" in the dataset:

Example 1:

 bias_slices = [{'education': 'low'}]

A single slice provided. In this case, slice_a is the collection of data with 'education' equals 'low', and slice_b is the collection of data with 'education' equals 'medium' or 'high'.

Example 2:

 bias_slices = [{'education': 'low'},
                {'education': 'high'}]

Two slices provided. In this case, slice_a is the collection of data with 'education' equals 'low', and slice_b is the collection of data with 'education' equals 'high'.

.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec bias_slices = 1;

Returns
Type Description
ModelEvaluationSlice.Slice.SliceSpec

The biasSlices.

getBiasSlicesOrBuilder()

public ModelEvaluationSlice.Slice.SliceSpecOrBuilder getBiasSlicesOrBuilder()

Specification for how the data should be sliced for bias. It contains a list of slices, with limitation of two slices. The first slice of data will be the slice_a. The second slice in the list (slice_b) will be compared against the first slice. If only a single slice is provided, then slice_a will be compared against "not slice_a". Below are examples with feature "education" with value "low", "medium", "high" in the dataset:

Example 1:

 bias_slices = [{'education': 'low'}]

A single slice provided. In this case, slice_a is the collection of data with 'education' equals 'low', and slice_b is the collection of data with 'education' equals 'medium' or 'high'.

Example 2:

 bias_slices = [{'education': 'low'},
                {'education': 'high'}]

Two slices provided. In this case, slice_a is the collection of data with 'education' equals 'low', and slice_b is the collection of data with 'education' equals 'high'.

.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec bias_slices = 1;

Returns
Type Description
ModelEvaluationSlice.Slice.SliceSpecOrBuilder

getDefaultInstanceForType()

public ModelEvaluation.BiasConfig getDefaultInstanceForType()
Returns
Type Description
ModelEvaluation.BiasConfig

getLabels(int index)

public String getLabels(int index)

Positive labels selection on the target field.

repeated string labels = 2;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The labels at the given index.

getLabelsBytes(int index)

public ByteString getLabelsBytes(int index)

Positive labels selection on the target field.

repeated string labels = 2;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the labels at the given index.

getLabelsCount()

public int getLabelsCount()

Positive labels selection on the target field.

repeated string labels = 2;

Returns
Type Description
int

The count of labels.

getLabelsList()

public ProtocolStringList getLabelsList()

Positive labels selection on the target field.

repeated string labels = 2;

Returns
Type Description
ProtocolStringList

A list containing the labels.

getParserForType()

public Parser<ModelEvaluation.BiasConfig> getParserForType()
Returns
Type Description
Parser<BiasConfig>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hasBiasSlices()

public boolean hasBiasSlices()

Specification for how the data should be sliced for bias. It contains a list of slices, with limitation of two slices. The first slice of data will be the slice_a. The second slice in the list (slice_b) will be compared against the first slice. If only a single slice is provided, then slice_a will be compared against "not slice_a". Below are examples with feature "education" with value "low", "medium", "high" in the dataset:

Example 1:

 bias_slices = [{'education': 'low'}]

A single slice provided. In this case, slice_a is the collection of data with 'education' equals 'low', and slice_b is the collection of data with 'education' equals 'medium' or 'high'.

Example 2:

 bias_slices = [{'education': 'low'},
                {'education': 'high'}]

Two slices provided. In this case, slice_a is the collection of data with 'education' equals 'low', and slice_b is the collection of data with 'education' equals 'high'.

.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec bias_slices = 1;

Returns
Type Description
boolean

Whether the biasSlices 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 ModelEvaluation.BiasConfig.Builder newBuilderForType()
Returns
Type Description
ModelEvaluation.BiasConfig.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

public ModelEvaluation.BiasConfig.Builder toBuilder()
Returns
Type Description
ModelEvaluation.BiasConfig.Builder

writeTo(CodedOutputStream output)

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