public class UserBasisRegressionEx2 extends Object
Fits a regression to a polynomial with user defined basis functions.
In this example, we fit the polynomial \(y = c_0 + c_1 x + c_2 x^2 \cdots +
c_4 x^4 + \varepsilon\). For this model, the user basis function is \(f_i (x)
= x^{i + 1}\) with \(i = 0,1, \cdots ,nBasis = 4\) and
hasIntercept=true
.
Data are generated using the model \(y = 10 + 2x + 5x^3\) with \(x = 0,1, \cdots 9\).
Constructor and Description |
---|
UserBasisRegressionEx2() |
public static void main(String[] args)
Copyright © 2020 Rogue Wave Software. All rights reserved.