Recommended reading from Statistics, Data Mining, and Machine Learning
in Astronomy ("SDMML") and Numerical Recipes ("NR"):
NR: 10.8
Regressing a little bit: Below is code to genrate data on the basis of a quadratic function.
n= 10000 x = np.random.permutation(np.linspace(0,1,n)) a = np.array([5.0,-5.0,10.0]) X = np.array([np.ones(n),x,x*x]).T Xlin = np.array([np.ones(n),x]).T y = np.dot(X,a) + np.random.normal(0.0,1,n)Plot these data points, x versus y. Then, with all points, train sklearn's "multilayer perceptron" with X and y with MLPRegressor. Find a best-fit curve in this way. Repeat with y as the target but Xlin as the input array (domain).