Class: Google::Apis::Adexchangebuyer2V2beta1::MetricValue
- Inherits:
-
Object
- Object
- Google::Apis::Adexchangebuyer2V2beta1::MetricValue
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/adexchangebuyer2_v2beta1/classes.rb,
lib/google/apis/adexchangebuyer2_v2beta1/representations.rb,
lib/google/apis/adexchangebuyer2_v2beta1/representations.rb
Overview
A metric value, with an expected value and a variance; represents a count that may be either exact or estimated (for example, when sampled).
Instance Attribute Summary collapse
-
#value ⇒ Fixnum
The expected value of the metric.
-
#variance ⇒ Fixnum
The variance (for example, square of the standard deviation) of the metric value.
Instance Method Summary collapse
-
#initialize(**args) ⇒ MetricValue
constructor
A new instance of MetricValue.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ MetricValue
Returns a new instance of MetricValue.
2657 2658 2659 |
# File 'lib/google/apis/adexchangebuyer2_v2beta1/classes.rb', line 2657 def initialize(**args) update!(**args) end |
Instance Attribute Details
#value ⇒ Fixnum
The expected value of the metric.
Corresponds to the JSON property value
2645 2646 2647 |
# File 'lib/google/apis/adexchangebuyer2_v2beta1/classes.rb', line 2645 def value @value end |
#variance ⇒ Fixnum
The variance (for example, square of the standard deviation) of the metric
value. If value is exact, variance is 0. Can be used to calculate margin of
error as a percentage of value, using the following formula, where Z is the
standard constant that depends on the preferred size of the confidence
interval (for example, for 90% confidence interval, use Z = 1.645):
marginOfError = 100 * Z * sqrt(variance) / value
Corresponds to the JSON property variance
2655 2656 2657 |
# File 'lib/google/apis/adexchangebuyer2_v2beta1/classes.rb', line 2655 def variance @variance end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2662 2663 2664 2665 |
# File 'lib/google/apis/adexchangebuyer2_v2beta1/classes.rb', line 2662 def update!(**args) @value = args[:value] if args.key?(:value) @variance = args[:variance] if args.key?(:variance) end |