Class ModelEvaluation.BiasConfig (3.23.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
TypeDescription
int

LABELS_FIELD_NUMBER

public static final int LABELS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static ModelEvaluation.BiasConfig getDefaultInstance()
Returns
TypeDescription
ModelEvaluation.BiasConfig

getDescriptor()

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

newBuilder()

public static ModelEvaluation.BiasConfig.Builder newBuilder()
Returns
TypeDescription
ModelEvaluation.BiasConfig.Builder

newBuilder(ModelEvaluation.BiasConfig prototype)

public static ModelEvaluation.BiasConfig.Builder newBuilder(ModelEvaluation.BiasConfig prototype)
Parameter
NameDescription
prototypeModelEvaluation.BiasConfig
Returns
TypeDescription
ModelEvaluation.BiasConfig.Builder

parseDelimitedFrom(InputStream input)

public static ModelEvaluation.BiasConfig parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
ModelEvaluation.BiasConfig
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

public static ModelEvaluation.BiasConfig parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
ModelEvaluation.BiasConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

public static ModelEvaluation.BiasConfig parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
ModelEvaluation.BiasConfig
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

public static ModelEvaluation.BiasConfig parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
ModelEvaluation.BiasConfig
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

public static ModelEvaluation.BiasConfig parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
ModelEvaluation.BiasConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getDefaultInstanceForType()

public ModelEvaluation.BiasConfig getDefaultInstanceForType()
Returns
TypeDescription
ModelEvaluation.BiasConfig

getLabels(int index)

public String getLabels(int index)

Positive labels selection on the target field.

repeated string labels = 2;

Parameter
NameDescription
indexint

The index of the element to return.

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

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
int

The count of labels.

getLabelsList()

public ProtocolStringList getLabelsList()

Positive labels selection on the target field.

repeated string labels = 2;

Returns
TypeDescription
ProtocolStringList

A list containing the labels.

getParserForType()

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

getSerializedSize()

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

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

public ModelEvaluation.BiasConfig.Builder toBuilder()
Returns
TypeDescription
ModelEvaluation.BiasConfig.Builder

writeTo(CodedOutputStream output)

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