I am newbie to java and now I want to apply the ordinary linear regression to two series, say [1, 2, 3, 4, 5] and [2, 3, 4, 5, 6].
I learn that there is a library called common math
. However, the documentation is difficult to understand, is there any example to do simple ordinary linear regression in java?
With math3 library you can do the way below. Sample is based on
SimpleRegression
class: