Click or drag to resize

WeightedRegressionWeightedT(IEnumerableTupleT, T, T, Boolean) Method

Weighted Linear Regression using normal equations.

Namespace: Altaxo.Calc.LinearRegression
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3572.0 (4.8.3572.0)
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  IEnumerableTupleT, T
List of sample vectors (predictor) together with their response.
weights  T
List of weights, one for each sample.
intercept  Boolean  (Optional)
True if an intercept should be added as first artificial predictor value. Default = false.

Type Parameters

T
The numeric element type.

Return Value

T
The fitted regression coefficients.
See Also