I need a curve-fitting mechanism where a series of (x, y) coordinates have to be put into a order 2 curve in a Mapper module of Map/Reduce code.
f(y) = a x^2+ b *x + c
Ideally, I would like to see that the curve is linear. That is need to verify, a = 0.
I have some links listed here:
- Spline (mathematics)
- An example code: spline code implementation.
- Michael Thomas Flanagan’s Java Scientific Library is fantastic place to start mathematical implementations in Java.