predict method
Returns the expected response {@code y} given the value of the predictor
variable {@code x}.
x
the value of the predictor variable
return the expected response {@code y} given the value of the predictor
variable {@code x}
Implementation
double predict(double x) {
// horner's method
var y = 0.0;
for (var j = beta.row - 1; j >= 0; j--) {
y = beta[j][0] + (x * y);
}
return y;
}