Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1StratifiedSplit

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/aiplatform_v1/classes.rb,
lib/google/apis/aiplatform_v1/representations.rb,
lib/google/apis/aiplatform_v1/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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1StratifiedSplit

Returns a new instance of GoogleCloudAiplatformV1StratifiedSplit.



28284
28285
28286
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 28284

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#keyString

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

Returns:

  • (String)


28267
28268
28269
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 28267

def key
  @key
end

#test_fractionFloat

The fraction of the input data that is to be used to evaluate the Model. Corresponds to the JSON property testFraction

Returns:

  • (Float)


28272
28273
28274
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 28272

def test_fraction
  @test_fraction
end

#training_fractionFloat

The fraction of the input data that is to be used to train the Model. Corresponds to the JSON property trainingFraction

Returns:

  • (Float)


28277
28278
28279
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 28277

def training_fraction
  @training_fraction
end

#validation_fractionFloat

The fraction of the input data that is to be used to validate the Model. Corresponds to the JSON property validationFraction

Returns:

  • (Float)


28282
28283
28284
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 28282

def validation_fraction
  @validation_fraction
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



28289
28290
28291
28292
28293
28294
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 28289

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