Class: OCI::AiAnomalyDetection::Models::ModelTrainingResults
- Inherits:
-
Object
- Object
- OCI::AiAnomalyDetection::Models::ModelTrainingResults
- Defined in:
- lib/oci/ai_anomaly_detection/models/model_training_results.rb
Overview
Specifies the details for an Anomaly Detection model trained with MSET.
Constant Summary collapse
- ALGORITHM_ENUM =
[ ALGORITHM_MULTIVARIATE_MSET = 'MULTIVARIATE_MSET'.freeze, ALGORITHM_UNIVARIATE_OCSVM = 'UNIVARIATE_OCSVM'.freeze, ALGORITHM_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#algorithm ⇒ String
Actual algorithm used to train the model.
-
#fap ⇒ Float
[Required] The final-achieved model accuracy metric on individual value level.
-
#is_training_goal_achieved ⇒ BOOLEAN
A boolean value to indicate if train goal/targetFap is achieved for trained model.
-
#multivariate_fap ⇒ Float
The model accuracy metric on timestamp level.
- #row_reduction_details ⇒ OCI::AiAnomalyDetection::Models::RowReductionDetails
-
#signal_details ⇒ Array<OCI::AiAnomalyDetection::Models::PerSignalDetails>
The list of signal details.
-
#warning ⇒ String
A warning message to explain the reason when targetFap cannot be achieved for trained model.
-
#window_size ⇒ Integer
Window size defined during training or deduced by the algorithm.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ModelTrainingResults
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ ModelTrainingResults
Initializes the object
95 96 97 98 99 100 101 102 103 104 105 106 107 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 |
# File 'lib/oci/ai_anomaly_detection/models/model_training_results.rb', line 95 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.fap = attributes[:'fap'] if attributes[:'fap'] self.multivariate_fap = attributes[:'multivariateFap'] if attributes[:'multivariateFap'] raise 'You cannot provide both :multivariateFap and :multivariate_fap' if attributes.key?(:'multivariateFap') && attributes.key?(:'multivariate_fap') self.multivariate_fap = attributes[:'multivariate_fap'] if attributes[:'multivariate_fap'] self.algorithm = attributes[:'algorithm'] if attributes[:'algorithm'] self.window_size = attributes[:'windowSize'] if attributes[:'windowSize'] raise 'You cannot provide both :windowSize and :window_size' if attributes.key?(:'windowSize') && attributes.key?(:'window_size') self.window_size = attributes[:'window_size'] if attributes[:'window_size'] self.is_training_goal_achieved = attributes[:'isTrainingGoalAchieved'] unless attributes[:'isTrainingGoalAchieved'].nil? raise 'You cannot provide both :isTrainingGoalAchieved and :is_training_goal_achieved' if attributes.key?(:'isTrainingGoalAchieved') && attributes.key?(:'is_training_goal_achieved') self.is_training_goal_achieved = attributes[:'is_training_goal_achieved'] unless attributes[:'is_training_goal_achieved'].nil? self.warning = attributes[:'warning'] if attributes[:'warning'] self.signal_details = attributes[:'signalDetails'] if attributes[:'signalDetails'] raise 'You cannot provide both :signalDetails and :signal_details' if attributes.key?(:'signalDetails') && attributes.key?(:'signal_details') self.signal_details = attributes[:'signal_details'] if attributes[:'signal_details'] self.row_reduction_details = attributes[:'rowReductionDetails'] if attributes[:'rowReductionDetails'] raise 'You cannot provide both :rowReductionDetails and :row_reduction_details' if attributes.key?(:'rowReductionDetails') && attributes.key?(:'row_reduction_details') self.row_reduction_details = attributes[:'row_reduction_details'] if attributes[:'row_reduction_details'] end |
Instance Attribute Details
#algorithm ⇒ String
Actual algorithm used to train the model
28 29 30 |
# File 'lib/oci/ai_anomaly_detection/models/model_training_results.rb', line 28 def algorithm @algorithm end |
#fap ⇒ Float
[Required] The final-achieved model accuracy metric on individual value level
20 21 22 |
# File 'lib/oci/ai_anomaly_detection/models/model_training_results.rb', line 20 def fap @fap end |
#is_training_goal_achieved ⇒ BOOLEAN
A boolean value to indicate if train goal/targetFap is achieved for trained model
36 37 38 |
# File 'lib/oci/ai_anomaly_detection/models/model_training_results.rb', line 36 def is_training_goal_achieved @is_training_goal_achieved end |
#multivariate_fap ⇒ Float
The model accuracy metric on timestamp level.
24 25 26 |
# File 'lib/oci/ai_anomaly_detection/models/model_training_results.rb', line 24 def multivariate_fap @multivariate_fap end |
#row_reduction_details ⇒ OCI::AiAnomalyDetection::Models::RowReductionDetails
47 48 49 |
# File 'lib/oci/ai_anomaly_detection/models/model_training_results.rb', line 47 def row_reduction_details @row_reduction_details end |
#signal_details ⇒ Array<OCI::AiAnomalyDetection::Models::PerSignalDetails>
The list of signal details.
44 45 46 |
# File 'lib/oci/ai_anomaly_detection/models/model_training_results.rb', line 44 def signal_details @signal_details end |
#warning ⇒ String
A warning message to explain the reason when targetFap cannot be achieved for trained model
40 41 42 |
# File 'lib/oci/ai_anomaly_detection/models/model_training_results.rb', line 40 def warning @warning end |
#window_size ⇒ Integer
Window size defined during training or deduced by the algorithm.
32 33 34 |
# File 'lib/oci/ai_anomaly_detection/models/model_training_results.rb', line 32 def window_size @window_size end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/oci/ai_anomaly_detection/models/model_training_results.rb', line 50 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'fap': :'fap', 'multivariate_fap': :'multivariateFap', 'algorithm': :'algorithm', 'window_size': :'windowSize', 'is_training_goal_achieved': :'isTrainingGoalAchieved', 'warning': :'warning', 'signal_details': :'signalDetails', 'row_reduction_details': :'rowReductionDetails' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/oci/ai_anomaly_detection/models/model_training_results.rb', line 66 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'fap': :'Float', 'multivariate_fap': :'Float', 'algorithm': :'String', 'window_size': :'Integer', 'is_training_goal_achieved': :'BOOLEAN', 'warning': :'String', 'signal_details': :'Array<OCI::AiAnomalyDetection::Models::PerSignalDetails>', 'row_reduction_details': :'OCI::AiAnomalyDetection::Models::RowReductionDetails' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/oci/ai_anomaly_detection/models/model_training_results.rb', line 158 def ==(other) return true if equal?(other) self.class == other.class && fap == other.fap && multivariate_fap == other.multivariate_fap && algorithm == other.algorithm && window_size == other.window_size && is_training_goal_achieved == other.is_training_goal_achieved && warning == other.warning && signal_details == other.signal_details && row_reduction_details == other.row_reduction_details end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 |
# File 'lib/oci/ai_anomaly_detection/models/model_training_results.rb', line 195 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
175 176 177 |
# File 'lib/oci/ai_anomaly_detection/models/model_training_results.rb', line 175 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
184 185 186 |
# File 'lib/oci/ai_anomaly_detection/models/model_training_results.rb', line 184 def hash [fap, multivariate_fap, algorithm, window_size, is_training_goal_achieved, warning, signal_details, row_reduction_details].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
228 229 230 231 232 233 234 235 236 237 |
# File 'lib/oci/ai_anomaly_detection/models/model_training_results.rb', line 228 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_s ⇒ String
Returns the string representation of the object
222 223 224 |
# File 'lib/oci/ai_anomaly_detection/models/model_training_results.rb', line 222 def to_s to_hash.to_s end |