predict¶
- numeric.fitting.predict(func, x)¶
- Predict y value using fitting function and x value. - Parameters
- func – (Fitting function object) Fitting function. 
- x – (float) x value. 
 
- Returns
- (float) y value. 
 - Examples: - from mipylib.numeric import fitting x = linspace(0.1, 10, 200) y = 20*pow(e, 3*x) plot(x, y, 'ro', fill=False, size=1) r = np.fitting.expfit(x, y, func=True) f = r[3] py = fitting.predict(f, 0.2) print py print 20*pow(e, 3*0.2) - Result: - >>> run script... 36.4423757947 36.4423760078 

