Aggregation.WeightedMean Method

Definition

Namespace: Numerics.NET.DataAnalysis
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.8.0

Overload List

WeightedMean<C>(ColumnSelector, ColumnSelector) Creates a descriptor that computes weighted means for selected value/weight column pairs.
WeightedMean<C>(C, C) Creates a descriptor that computes the weighted mean of one column using another as weights.

WeightedMean<C>(ColumnSelector, ColumnSelector)

Creates a descriptor that computes weighted means for selected value/weight column pairs.
C#
public static Aggregation<C, string> WeightedMean<C>(
	ColumnSelector values,
	ColumnSelector weights
)

Parameters

values  ColumnSelector
The selector that identifies value columns.
weights  ColumnSelector
The selector that identifies weight columns.

Type Parameters

C
The type of the data frame column key.

Return Value

Aggregation<C, String>
A weighted-mean aggregation descriptor.

Remarks

Selector-based binary descriptors expand cartesian.

Exceptions

ArgumentNullExceptionvalues or weights is null.

WeightedMean<C>(C, C)

Creates a descriptor that computes the weighted mean of one column using another as weights.
C#
public static Aggregation<C, string> WeightedMean<C>(
	C valueKey,
	C weightKey
)

Parameters

valueKey  C
The key of the value column.
weightKey  C
The key of the weight column.

Type Parameters

C
The type of the data frame column key.

Return Value

Aggregation<C, String>
A weighted-mean aggregation descriptor.

Exceptions

ArgumentNullExceptionvalueKey or weightKey is null.

See Also