Click or drag to resize
WeightedRegressionWeightedT Method (IEnumerableTupleT, T, T, Boolean)
Weighted Linear Regression using normal equations.

Namespace: MathNet.Numerics.LinearRegression
Assembly: MathNet.Numerics (in MathNet.Numerics.dll) Version: 3.7
Syntax
C#
public static T[] Weighted<T>(
	IEnumerable<Tuple<T[], T>> samples,
	T[] weights,
	bool intercept = false
)
where T : struct, new(), IEquatable<T>, IFormattable

Parameters

samples
Type: System.Collections.GenericIEnumerableTupleT, T
List of sample vectors (predictor) together with their response.
weights
Type: T
List of weights, one for each sample.
intercept (Optional)
Type: SystemBoolean
True if an intercept should be added as first artificial predictor value. Default = false.

Type Parameters

T

Return Value

Type: T
See Also