Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1StratifiedSplit
- Inherits:
-
Object
- Object
- Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1StratifiedSplit
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/aiplatform_v1beta1/classes.rb,
lib/google/apis/aiplatform_v1beta1/representations.rb,
lib/google/apis/aiplatform_v1beta1/representations.rb
Overview
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.
Instance Attribute Summary collapse
-
#key ⇒ String
Required.
-
#test_fraction ⇒ Float
The fraction of the input data that is to be used to evaluate the Model.
-
#training_fraction ⇒ Float
The fraction of the input data that is to be used to train the Model.
-
#validation_fraction ⇒ Float
The fraction of the input data that is to be used to validate the Model.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1StratifiedSplit
constructor
A new instance of GoogleCloudAiplatformV1beta1StratifiedSplit.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1StratifiedSplit
Returns a new instance of GoogleCloudAiplatformV1beta1StratifiedSplit.
26400 26401 26402 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 26400 def initialize(**args) update!(**args) end |
Instance Attribute Details
#key ⇒ String
Required. The key is a name of one of the Dataset's data columns. The key
provided must be for a categorical column.
Corresponds to the JSON property key
26383 26384 26385 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 26383 def key @key end |
#test_fraction ⇒ Float
The fraction of the input data that is to be used to evaluate the Model.
Corresponds to the JSON property testFraction
26388 26389 26390 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 26388 def test_fraction @test_fraction end |
#training_fraction ⇒ Float
The fraction of the input data that is to be used to train the Model.
Corresponds to the JSON property trainingFraction
26393 26394 26395 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 26393 def training_fraction @training_fraction end |
#validation_fraction ⇒ Float
The fraction of the input data that is to be used to validate the Model.
Corresponds to the JSON property validationFraction
26398 26399 26400 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 26398 def validation_fraction @validation_fraction end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
26405 26406 26407 26408 26409 26410 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 26405 def update!(**args) @key = args[:key] if args.key?(:key) @test_fraction = args[:test_fraction] if args.key?(:test_fraction) @training_fraction = args[:training_fraction] if args.key?(:training_fraction) @validation_fraction = args[:validation_fraction] if args.key?(:validation_fraction) end |