Class: Google::Apis::PredictionV1_5::Analyze::DataDescription::Feature

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/prediction_v1_5/classes.rb,
generated/google/apis/prediction_v1_5/representations.rb,
generated/google/apis/prediction_v1_5/representations.rb

Defined Under Namespace

Classes: Categorical, Numeric, Text

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Feature

Returns a new instance of Feature



121
122
123
# File 'generated/google/apis/prediction_v1_5/classes.rb', line 121

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

Instance Attribute Details

#categoricalGoogle::Apis::PredictionV1_5::Analyze::DataDescription::Feature::Categorical

Description of the categorical values of this feature. Corresponds to the JSON property categorical



104
105
106
# File 'generated/google/apis/prediction_v1_5/classes.rb', line 104

def categorical
  @categorical
end

#indexFixnum

The feature index. Corresponds to the JSON property index

Returns:

  • (Fixnum)


109
110
111
# File 'generated/google/apis/prediction_v1_5/classes.rb', line 109

def index
  @index
end

#numericGoogle::Apis::PredictionV1_5::Analyze::DataDescription::Feature::Numeric

Description of the numeric values of this feature. Corresponds to the JSON property numeric



114
115
116
# File 'generated/google/apis/prediction_v1_5/classes.rb', line 114

def numeric
  @numeric
end

#textGoogle::Apis::PredictionV1_5::Analyze::DataDescription::Feature::Text

Description of multiple-word text values of this feature. Corresponds to the JSON property text



119
120
121
# File 'generated/google/apis/prediction_v1_5/classes.rb', line 119

def text
  @text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



126
127
128
129
130
131
# File 'generated/google/apis/prediction_v1_5/classes.rb', line 126

def update!(**args)
  @categorical = args[:categorical] if args.key?(:categorical)
  @index = args[:index] if args.key?(:index)
  @numeric = args[:numeric] if args.key?(:numeric)
  @text = args[:text] if args.key?(:text)
end