Package dev.nm.stat.regression
Class WeightedRSS
- java.lang.Object
-
- dev.nm.stat.regression.WeightedRSS
-
public class WeightedRSS extends Object
Weighted sum of squared residuals (RSS) for a given function \(f(.)\) and observations \((x_i,y_i)\). \[ RSS = \sum_{i=1}^n w_i [y_i - f(x_i)]^2 \]- See Also:
- Wikipedia: Least Squares
-
-
Constructor Summary
Constructors Constructor Description WeightedRSS(UnivariateRealFunction f)
Constructs a calculator to compute the weighted RSS for a given function.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
value(double[] x, double[] y, double[] weights)
Computes the weighted RSS for a set of observations.
-
-
-
Constructor Detail
-
WeightedRSS
public WeightedRSS(UnivariateRealFunction f)
Constructs a calculator to compute the weighted RSS for a given function.- Parameters:
f
- a function
-
-