Class: OCI::AiAnomalyDetection::Models::PerSignalDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/ai_anomaly_detection/models/per_signal_details.rb

Overview

Detailed information like statistics, metrics and status for a signal

Constant Summary collapse

STATUS_ENUM =
[
  STATUS_ACCEPTED = 'ACCEPTED'.freeze,
  STATUS_DROPPED = 'DROPPED'.freeze,
  STATUS_OTHER = 'OTHER'.freeze,
  STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ PerSignalDetails

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):

  • :signal_name (String)

    The value to assign to the #signal_name property

  • :mvi_ratio (Float)

    The value to assign to the #mvi_ratio property

  • :is_quantized (BOOLEAN)

    The value to assign to the #is_quantized property

  • :fap (Float)

    The value to assign to the #fap property

  • :min (Float)

    The value to assign to the #min property

  • :max (Float)

    The value to assign to the #max property

  • :std (Float)

    The value to assign to the #std property

  • :status (String)

    The value to assign to the #status property

  • :details (String)

    The value to assign to the #details property



108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# File 'lib/oci/ai_anomaly_detection/models/per_signal_details.rb', line 108

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  self.signal_name = attributes[:'signalName'] if attributes[:'signalName']

  raise 'You cannot provide both :signalName and :signal_name' if attributes.key?(:'signalName') && attributes.key?(:'signal_name')

  self.signal_name = attributes[:'signal_name'] if attributes[:'signal_name']

  self.mvi_ratio = attributes[:'mviRatio'] if attributes[:'mviRatio']

  raise 'You cannot provide both :mviRatio and :mvi_ratio' if attributes.key?(:'mviRatio') && attributes.key?(:'mvi_ratio')

  self.mvi_ratio = attributes[:'mvi_ratio'] if attributes[:'mvi_ratio']

  self.is_quantized = attributes[:'isQuantized'] unless attributes[:'isQuantized'].nil?

  raise 'You cannot provide both :isQuantized and :is_quantized' if attributes.key?(:'isQuantized') && attributes.key?(:'is_quantized')

  self.is_quantized = attributes[:'is_quantized'] unless attributes[:'is_quantized'].nil?

  self.fap = attributes[:'fap'] if attributes[:'fap']

  self.min = attributes[:'min'] if attributes[:'min']

  self.max = attributes[:'max'] if attributes[:'max']

  self.std = attributes[:'std'] if attributes[:'std']

  self.status = attributes[:'status'] if attributes[:'status']

  self.details = attributes[:'details'] if attributes[:'details']
end

Instance Attribute Details

#detailsString

detailed information for a signal.

Returns:

  • (String)


57
58
59
# File 'lib/oci/ai_anomaly_detection/models/per_signal_details.rb', line 57

def details
  @details
end

#fapFloat

Accuracy metric for a signal.

Returns:

  • (Float)


33
34
35
# File 'lib/oci/ai_anomaly_detection/models/per_signal_details.rb', line 33

def fap
  @fap
end

#is_quantizedBOOLEAN

A boolean value to indicate if a signal is quantized or not.

Returns:

  • (BOOLEAN)


29
30
31
# File 'lib/oci/ai_anomaly_detection/models/per_signal_details.rb', line 29

def is_quantized
  @is_quantized
end

#maxFloat

[Required] Max value within a signal.

Returns:

  • (Float)


41
42
43
# File 'lib/oci/ai_anomaly_detection/models/per_signal_details.rb', line 41

def max
  @max
end

#minFloat

[Required] Min value within a signal.

Returns:

  • (Float)


37
38
39
# File 'lib/oci/ai_anomaly_detection/models/per_signal_details.rb', line 37

def min
  @min
end

#mvi_ratioFloat

The ratio of missing values in a signal filled/imputed by the IDP algorithm.

Returns:

  • (Float)


25
26
27
# File 'lib/oci/ai_anomaly_detection/models/per_signal_details.rb', line 25

def mvi_ratio
  @mvi_ratio
end

#signal_nameString

[Required] The name of a signal.

Returns:

  • (String)


21
22
23
# File 'lib/oci/ai_anomaly_detection/models/per_signal_details.rb', line 21

def signal_name
  @signal_name
end

#statusString

[Required] Status of the signal: * ACCEPTED - the signal is used for training the model * DROPPED - the signal does not meet requirement, and is dropped before training the model. * OTHER - placeholder for other status

Returns:

  • (String)


53
54
55
# File 'lib/oci/ai_anomaly_detection/models/per_signal_details.rb', line 53

def status
  @status
end

#stdFloat

[Required] Standard deviation of values within a signal.

Returns:

  • (Float)


45
46
47
# File 'lib/oci/ai_anomaly_detection/models/per_signal_details.rb', line 45

def std
  @std
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/oci/ai_anomaly_detection/models/per_signal_details.rb', line 60

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'signal_name': :'signalName',
    'mvi_ratio': :'mviRatio',
    'is_quantized': :'isQuantized',
    'fap': :'fap',
    'min': :'min',
    'max': :'max',
    'std': :'std',
    'status': :'status',
    'details': :'details'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/oci/ai_anomaly_detection/models/per_signal_details.rb', line 77

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'signal_name': :'String',
    'mvi_ratio': :'Float',
    'is_quantized': :'BOOLEAN',
    'fap': :'Float',
    'min': :'Float',
    'max': :'Float',
    'std': :'Float',
    'status': :'String',
    'details': :'String'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



165
166
167
168
169
170
171
172
173
174
175
176
177
178
# File 'lib/oci/ai_anomaly_detection/models/per_signal_details.rb', line 165

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    signal_name == other.signal_name &&
    mvi_ratio == other.mvi_ratio &&
    is_quantized == other.is_quantized &&
    fap == other.fap &&
    min == other.min &&
    max == other.max &&
    std == other.std &&
    status == other.status &&
    details == other.details
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
# File 'lib/oci/ai_anomaly_detection/models/per_signal_details.rb', line 203

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)

  self.class.swagger_types.each_pair do |key, type|
    if type =~ /^Array<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        public_method("#{key}=").call(
          attributes[self.class.attribute_map[key]]
            .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
        )
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      public_method("#{key}=").call(
        OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
      )
    end
    # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(other) ⇒ Boolean

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


183
184
185
# File 'lib/oci/ai_anomaly_detection/models/per_signal_details.rb', line 183

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



192
193
194
# File 'lib/oci/ai_anomaly_detection/models/per_signal_details.rb', line 192

def hash
  [signal_name, mvi_ratio, is_quantized, fap, min, max, std, status, details].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



236
237
238
239
240
241
242
243
244
245
# File 'lib/oci/ai_anomaly_detection/models/per_signal_details.rb', line 236

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = public_method(attr).call
    next if value.nil? && !instance_variable_defined?("@#{attr}")

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



230
231
232
# File 'lib/oci/ai_anomaly_detection/models/per_signal_details.rb', line 230

def to_s
  to_hash.to_s
end