Package com.google.cloud.aiplatform.v1
Class StratifiedSplit.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<StratifiedSplit.Builder>
-
- com.google.cloud.aiplatform.v1.StratifiedSplit.Builder
-
- All Implemented Interfaces:
StratifiedSplitOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- StratifiedSplit
public static final class StratifiedSplit.Builder extends com.google.protobuf.GeneratedMessageV3.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 typegoogle.cloud.aiplatform.v1.StratifiedSplit
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StratifiedSplit.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)StratifiedSplitbuild()StratifiedSplitbuildPartial()StratifiedSplit.Builderclear()StratifiedSplit.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)StratifiedSplit.BuilderclearKey()Required.StratifiedSplit.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)StratifiedSplit.BuilderclearTestFraction()The fraction of the input data that is to be used to evaluate the Model.StratifiedSplit.BuilderclearTrainingFraction()The fraction of the input data that is to be used to train the Model.StratifiedSplit.BuilderclearValidationFraction()The fraction of the input data that is to be used to validate the Model.StratifiedSplit.Builderclone()StratifiedSplitgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()StringgetKey()Required.com.google.protobuf.ByteStringgetKeyBytes()Required.doublegetTestFraction()The fraction of the input data that is to be used to evaluate the Model.doublegetTrainingFraction()The fraction of the input data that is to be used to train the Model.doublegetValidationFraction()The fraction of the input data that is to be used to validate the Model.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()StratifiedSplit.BuildermergeFrom(StratifiedSplit other)StratifiedSplit.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)StratifiedSplit.BuildermergeFrom(com.google.protobuf.Message other)StratifiedSplit.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)StratifiedSplit.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)StratifiedSplit.BuildersetKey(String value)Required.StratifiedSplit.BuildersetKeyBytes(com.google.protobuf.ByteString value)Required.StratifiedSplit.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)StratifiedSplit.BuildersetTestFraction(double value)The fraction of the input data that is to be used to evaluate the Model.StratifiedSplit.BuildersetTrainingFraction(double value)The fraction of the input data that is to be used to train the Model.StratifiedSplit.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)StratifiedSplit.BuildersetValidationFraction(double value)The fraction of the input data that is to be used to validate the Model.-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<StratifiedSplit.Builder>
-
clear
public StratifiedSplit.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<StratifiedSplit.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<StratifiedSplit.Builder>
-
getDefaultInstanceForType
public StratifiedSplit getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public StratifiedSplit build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public StratifiedSplit buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public StratifiedSplit.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<StratifiedSplit.Builder>
-
setField
public StratifiedSplit.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<StratifiedSplit.Builder>
-
clearField
public StratifiedSplit.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<StratifiedSplit.Builder>
-
clearOneof
public StratifiedSplit.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<StratifiedSplit.Builder>
-
setRepeatedField
public StratifiedSplit.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<StratifiedSplit.Builder>
-
addRepeatedField
public StratifiedSplit.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<StratifiedSplit.Builder>
-
mergeFrom
public StratifiedSplit.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<StratifiedSplit.Builder>
-
mergeFrom
public StratifiedSplit.Builder mergeFrom(StratifiedSplit other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<StratifiedSplit.Builder>
-
mergeFrom
public StratifiedSplit.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<StratifiedSplit.Builder>- Throws:
IOException
-
getTrainingFraction
public double getTrainingFraction()
The fraction of the input data that is to be used to train the Model.
double training_fraction = 1;- Specified by:
getTrainingFractionin interfaceStratifiedSplitOrBuilder- Returns:
- The trainingFraction.
-
setTrainingFraction
public StratifiedSplit.Builder setTrainingFraction(double value)
The fraction of the input data that is to be used to train the Model.
double training_fraction = 1;- Parameters:
value- The trainingFraction to set.- Returns:
- This builder for chaining.
-
clearTrainingFraction
public StratifiedSplit.Builder clearTrainingFraction()
The fraction of the input data that is to be used to train the Model.
double training_fraction = 1;- Returns:
- This builder for chaining.
-
getValidationFraction
public double getValidationFraction()
The fraction of the input data that is to be used to validate the Model.
double validation_fraction = 2;- Specified by:
getValidationFractionin interfaceStratifiedSplitOrBuilder- Returns:
- The validationFraction.
-
setValidationFraction
public StratifiedSplit.Builder setValidationFraction(double value)
The fraction of the input data that is to be used to validate the Model.
double validation_fraction = 2;- Parameters:
value- The validationFraction to set.- Returns:
- This builder for chaining.
-
clearValidationFraction
public StratifiedSplit.Builder clearValidationFraction()
The fraction of the input data that is to be used to validate the Model.
double validation_fraction = 2;- Returns:
- This builder for chaining.
-
getTestFraction
public double getTestFraction()
The fraction of the input data that is to be used to evaluate the Model.
double test_fraction = 3;- Specified by:
getTestFractionin interfaceStratifiedSplitOrBuilder- Returns:
- The testFraction.
-
setTestFraction
public StratifiedSplit.Builder setTestFraction(double value)
The fraction of the input data that is to be used to evaluate the Model.
double test_fraction = 3;- Parameters:
value- The testFraction to set.- Returns:
- This builder for chaining.
-
clearTestFraction
public StratifiedSplit.Builder clearTestFraction()
The fraction of the input data that is to be used to evaluate the Model.
double test_fraction = 3;- Returns:
- This builder for chaining.
-
getKey
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];- Specified by:
getKeyin interfaceStratifiedSplitOrBuilder- Returns:
- The key.
-
getKeyBytes
public 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];- Specified by:
getKeyBytesin interfaceStratifiedSplitOrBuilder- Returns:
- The bytes for key.
-
setKey
public 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];- Parameters:
value- The key to set.- Returns:
- This builder for chaining.
-
clearKey
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];- Returns:
- This builder for chaining.
-
setKeyBytes
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];- Parameters:
value- The bytes for key to set.- Returns:
- This builder for chaining.
-
setUnknownFields
public final StratifiedSplit.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<StratifiedSplit.Builder>
-
mergeUnknownFields
public final StratifiedSplit.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<StratifiedSplit.Builder>
-
-