y1 is a numpy.ndarray with length 106 (representing heights measured in meters)
x1 is a numpy.ndarray with length 106 (representing ages of the boys corresponding to the heights)
I'm trying to predict heights given ages with linear regression using gradient descent, and then to plot it as a 3D surface plot.
When I try to do .fit(), it tells me
ValueError: Found arrays with inconsistent numbers of samples: [ 1 106]
import numpy as np
from sklearn import linear_model
x1 = np.fromfile('ex2x.dat', float)
y1 = np.fromfile('ex2y.dat', float)
clf = linear_model.SGDRegressor(alpha=.007)
clf.fit(x1, y1)
y_predicted = clf.predict(3.5)