[Tutor] quick question

Terry Carroll carroll at tjc.com
Tue Sep 25 02:48:24 CEST 2007


On Mon, 24 Sep 2007, max baseman wrote:

> for example how hard would it be to write a program that take's a  
> input of a in out table and finds the rule
> 
> ex:
> 
> 	in	out
> 	10	23
> 	5	13
> 	1	5
> 	0	3
> 
> the rule is in*2+3

This is called linear regression.  A search for "Python Linear Regression"
should help you out.  Some sample code is at
http://www.answermysearches.com/how-to-do-a-simple-linear-regression-in-python/124/




More information about the Tutor mailing list