title: Using sklearn Linear Regression and PCA in a single Pipeline
body: <p>I have a Pandas data frame with 20 numeric features and a numeric response column. I would like to first apply PCA to bring the dimensionality down to 10 and then run Linear Regression to predict the numeric response. I can do this currently using two steps</p>
  
  <pre><code>pipeline = Pipeline([('scaling', StandardScaler()),
                       ('pca', PCA(n_components=20, whiten=True))])
  newDF = pipeline.fit_transform(numericDF)
  
  Y = df["Response"]
  model = LinearRegression()
  model.fit(newDF, Y)
  </code></pre>
  
  <p>Is there a way to combine Linear Regression in the above pipeline? I ask this question because</p>
  
  <ol>
  <li><code>fit_transform</code> is not supported in Linear Regression.</li>
  <li><code>fit_predict</code> can't be used with PCA.</li>
  <li>It's not a one-off use case</li>
  </ol>
  
  <p>How could I run PCA and then Linear Regression all in the same pipeline?</p>