public static final class StratifiedSplit.Builder extends com.google.protobuf.GeneratedMessage.Builder<StratifiedSplit.Builder> implements StratifiedSplitOrBuilder
Assigns input data to the training, validation, and test sets so that the distribution of values found in the categorical column (as specified by the `key` field) is mirrored within each split. The fraction values determine the relative sizes of the splits. For example, if the specified column has three values, with 50% of the rows having value "A", 25% value "B", and 25% value "C", and the split fractions are specified as 80/10/10, then the training set will constitute 80% of the training data, with about 50% of the training set rows having the value "A" for the specified column, about 25% having the value "B", and about 25% having the value "C". Only the top 500 occurring values are used; any values not in the top 500 values are randomly assigned to a split. If less than three rows contain a specific value, those rows are randomly assigned. Supported only for tabular Datasets.Protobuf type
google.cloud.aiplatform.v1.StratifiedSplit| Modifier and Type | Method and Description |
|---|---|
StratifiedSplit |
build() |
StratifiedSplit |
buildPartial() |
StratifiedSplit.Builder |
clear() |
StratifiedSplit.Builder |
clearKey()
Required.
|
StratifiedSplit.Builder |
clearTestFraction()
The fraction of the input data that is to be used to evaluate the Model.
|
StratifiedSplit.Builder |
clearTrainingFraction()
The fraction of the input data that is to be used to train the Model.
|
StratifiedSplit.Builder |
clearValidationFraction()
The fraction of the input data that is to be used to validate the Model.
|
StratifiedSplit |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
String |
getKey()
Required.
|
com.google.protobuf.ByteString |
getKeyBytes()
Required.
|
double |
getTestFraction()
The fraction of the input data that is to be used to evaluate the Model.
|
double |
getTrainingFraction()
The fraction of the input data that is to be used to train the Model.
|
double |
getValidationFraction()
The fraction of the input data that is to be used to validate the Model.
|
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
StratifiedSplit.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
StratifiedSplit.Builder |
mergeFrom(com.google.protobuf.Message other) |
StratifiedSplit.Builder |
mergeFrom(StratifiedSplit other) |
StratifiedSplit.Builder |
setKey(String value)
Required.
|
StratifiedSplit.Builder |
setKeyBytes(com.google.protobuf.ByteString value)
Required.
|
StratifiedSplit.Builder |
setTestFraction(double value)
The fraction of the input data that is to be used to evaluate the Model.
|
StratifiedSplit.Builder |
setTrainingFraction(double value)
The fraction of the input data that is to be used to train the Model.
|
StratifiedSplit.Builder |
setValidationFraction(double value)
The fraction of the input data that is to be used to validate the Model.
|
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfindInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneofpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<StratifiedSplit.Builder>public StratifiedSplit.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessage.Builder<StratifiedSplit.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<StratifiedSplit.Builder>public StratifiedSplit getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic StratifiedSplit build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic StratifiedSplit buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic StratifiedSplit.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<StratifiedSplit.Builder>public StratifiedSplit.Builder mergeFrom(StratifiedSplit other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessage.Builder<StratifiedSplit.Builder>public StratifiedSplit.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<StratifiedSplit.Builder>IOExceptionpublic double getTrainingFraction()
The fraction of the input data that is to be used to train the Model.
double training_fraction = 1;getTrainingFraction in interface StratifiedSplitOrBuilderpublic StratifiedSplit.Builder setTrainingFraction(double value)
The fraction of the input data that is to be used to train the Model.
double training_fraction = 1;value - The trainingFraction to set.public StratifiedSplit.Builder clearTrainingFraction()
The fraction of the input data that is to be used to train the Model.
double training_fraction = 1;public double getValidationFraction()
The fraction of the input data that is to be used to validate the Model.
double validation_fraction = 2;getValidationFraction in interface StratifiedSplitOrBuilderpublic StratifiedSplit.Builder setValidationFraction(double value)
The fraction of the input data that is to be used to validate the Model.
double validation_fraction = 2;value - The validationFraction to set.public StratifiedSplit.Builder clearValidationFraction()
The fraction of the input data that is to be used to validate the Model.
double validation_fraction = 2;public double getTestFraction()
The fraction of the input data that is to be used to evaluate the Model.
double test_fraction = 3;getTestFraction in interface StratifiedSplitOrBuilderpublic StratifiedSplit.Builder setTestFraction(double value)
The fraction of the input data that is to be used to evaluate the Model.
double test_fraction = 3;value - The testFraction to set.public StratifiedSplit.Builder clearTestFraction()
The fraction of the input data that is to be used to evaluate the Model.
double test_fraction = 3;public String getKey()
Required. The key is a name of one of the Dataset's data columns. The key provided must be for a categorical column.
string key = 4 [(.google.api.field_behavior) = REQUIRED];getKey in interface StratifiedSplitOrBuilderpublic com.google.protobuf.ByteString getKeyBytes()
Required. The key is a name of one of the Dataset's data columns. The key provided must be for a categorical column.
string key = 4 [(.google.api.field_behavior) = REQUIRED];getKeyBytes in interface StratifiedSplitOrBuilderpublic StratifiedSplit.Builder setKey(String value)
Required. The key is a name of one of the Dataset's data columns. The key provided must be for a categorical column.
string key = 4 [(.google.api.field_behavior) = REQUIRED];value - The key to set.public StratifiedSplit.Builder clearKey()
Required. The key is a name of one of the Dataset's data columns. The key provided must be for a categorical column.
string key = 4 [(.google.api.field_behavior) = REQUIRED];public StratifiedSplit.Builder setKeyBytes(com.google.protobuf.ByteString value)
Required. The key is a name of one of the Dataset's data columns. The key provided must be for a categorical column.
string key = 4 [(.google.api.field_behavior) = REQUIRED];value - The bytes for key to set.Copyright © 2026 Google LLC. All rights reserved.