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.GeneratedMessage.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.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-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()clearKey()Required.The fraction of the input data that is to be used to evaluate the Model.The fraction of the input data that is to be used to train the Model.The fraction of the input data that is to be used to validate the Model.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetKey()Required.com.google.protobuf.ByteStringRequired.doubleThe fraction of the input data that is to be used to evaluate the Model.doubleThe fraction of the input data that is to be used to train the Model.doubleThe fraction of the input data that is to be used to validate the Model.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(StratifiedSplit other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) Required.setKeyBytes(com.google.protobuf.ByteString value) Required.setTestFraction(double value) The fraction of the input data that is to be used to evaluate the Model.setTrainingFraction(double value) The fraction of the input data that is to be used to train the Model.setValidationFraction(double value) The fraction of the input data that is to be used to validate the Model.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
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, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<StratifiedSplit.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.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.GeneratedMessage.Builder<StratifiedSplit.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<StratifiedSplit.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.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
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
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
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
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
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
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
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
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
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
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.
-