Multiple Regression in Python

from sklearn import linear_model
clf = linear_model.LinearRegression()[[getattr(t, 'x%d' % i) for i in range(1, 8)] for t in texts],
        [t.y for t in texts])
#clf.coef_ will have the regression coefficients.

Here is what the above code is Doing:
1. Create a LinearRegression object.
2. Fit the object to the training data.
3. The clf.coef_ attribute will contain the regression coefficients.

You can use the LinearRegression object to make predictions on new data.