Show / Hide Table of Contents

Class AddVariance

This is the main class that adds variance expressions to a MetricsPlan. It transforms a MetricsPlan by adding all necessary Expression's to compute variance for a collection of output metrics, either by applying the standard variance method in the case that those metrics are at the experiment unit level, or via the delta method in the case that the metrics are below the the experiment unit level.

Inheritance
Object
LoggingTransformerBase
AddVariance
AddVarianceWithStrongTypeHistogram
Implements
IMetricsPlanTransformer
Inherited Members
LoggingTransformerBase.Logger
LoggingTransformerBase.TransformerName
LoggingTransformerBase.Transform(MetricsPlan, IMetricsPlanValidator)
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Mangrove.MetricSetTransformers.Statistics
Assembly: MetricSetTransformers.dll
Syntax
public class AddVariance : LoggingTransformerBase, IMetricsPlanTransformer
Remarks

The formulas here should be compared with those used in the Foray codebase ( https://dev.azure.com/experimentation/Analysis%20and%20Experimentation/_git/AnE.ExP.ScorecardPipeline?path=%2Fprivate%2FForay%2FForay.UserDefinedObjects%2FVarianceHelper.cs ) and Hypercube codebase ( https://dev.azure.com/experimentation/Hypercube/_git/hypercube-spark?path=%2Fsrc%2Fmain%2Fscala%2Fhypercube%2Fcore%2FMetricResult.scala ).

Constructors

View Source

AddVariance(ISet<String>, ILogger)

Construct an AddVariance object with a set of outcome metrics to expect.

Declaration
public AddVariance(ISet<string> outputMetrics = null, ILogger logger = null)
Parameters
Type Name Description
ISet<String> outputMetrics

The set of average output metric names, not table-qualified.

ILogger logger
Remarks

The output metrics are the list of columns (by name) that will be expanded to include summary statistics about the column.

Methods

View Source

CreateHistogramOperation(Expression)

Declaration
protected virtual Expression CreateHistogramOperation(Expression expr)
Parameters
Type Name Description
Expression expr
Returns
Type Description
Expression
View Source

GenerateStdDevExpressions(ColumnReference, Table, Expression, Expression)

Declaration
public (ColumnReference count, ColumnReference stdev) GenerateStdDevExpressions(ColumnReference metric, Table aggregationTable, Expression obsCount, Expression stdDev)
Parameters
Type Name Description
ColumnReference metric
Table aggregationTable
Expression obsCount
Expression stdDev
Returns
Type Description
ValueTuple<ColumnReference, ColumnReference>
View Source

TransformWithTracing(MetricsPlan, IMetricsPlanValidator)

Return a new MetricsPlan with additional Expression's necessary to compute variance for every metric. Determines if the variance computation is standard or requires the Delta method. It does this by checking if the metric in question is at (in which case standard variance) or below (in which case Delta method variance) the experiment unit level.

Declaration
public override MetricsPlan TransformWithTracing(MetricsPlan plan, IMetricsPlanValidator validator)
Parameters
Type Name Description
MetricsPlan plan
IMetricsPlanValidator validator
Returns
Type Description
MetricsPlan
Overrides
LoggingTransformerBase.TransformWithTracing(MetricsPlan, IMetricsPlanValidator)

Implements

IMetricsPlanTransformer

Extension Methods

ObjectExtensions.EventId(Object)
  • View Source
Back to top Generated by DocFX