back Auction Sniper

Math.Net Monotone Cubic Fits over an interval

Background
NIST:  constraints for cubic monotonicity
monpol: Monotone Polynomials (in R)
By observation, Cubic is monotonic if
  • end slopes are 0 or of the same sign
  • inflection point in interval is 0 or of the same sign
cubic:  y = a + b*x +c*x*x + d*x*x*x;   0 <= x <=1
cubic slope:   b + 2*c*x + 3*d*x*x
slope @0:   b
slope @1:   b + 2*c + 3*d
non-negative monotone end slopes product
b*(b + 2*c + 3*d) >= 0
inflection point:   2*c + 6*d*x = 0
x = - c/3*d
slope must must be checked for 0 > c/3*d > -1
Math.Net.Fit.Curve() interative optimization
based on FindMinimum.OfScalarFunction
Implement a cubic function, constraining optimized coefficients
by returning full scale values for non-monotonic slopes.
maintained by blekenbleu