How do I pass test data to a regression equation in python?
<p>I have built a regression equation for a train dataframe (b) which has all the Xs (input variables) in collist. My response variable - Y is SalePrice.</p>

<pre><code>X = b[collist].values
y = b[['SalePrice']]
reg2 = LinearRegression()
reg2.fit(X, y)
(reg2.intercept_, reg2.coef_)
</code></pre>

<p>I got an array of coefficients.</p>

<pre><code>(array([-1003980.93890187]),
 array([[  1.13921901e+01,   6.72094755e-01,   3.57706059e+02,
           9.11889135e+01,   1.74211742e+01,   1.49978955e+01,
           1.01590205e+01,  -2.39999419e+00,   2.27570861e+01,
           ..........
           ..more terms...
           1.88596429e+01,   3.57099213e+01,  -2.91352714e+01,
           2.54343753e+01,   1.79479162e+03,   6.95632849e+02,
           3.97891154e+03,   1.67768978e+03,  -2.06711712e+03,
          -4.70429021e+03]]))
</code></pre>

<p>How do I identify which coefficient is for which term?</p>

<p>Also, how do I pass a test dataframe in this equation and get response variable?</p>

<p>for test data, I got another dataframe as well in which, column for SalePrice(response) is absent.</p>

<p>Thank you.</p>