title: How to fit a polynomial curve to data using scikit-learn?
body: <h1>Problem context</h1>
  <p>Using <code>scikit-learn</code> with Python, I'm trying to fit a quadratic polynomial curve to a set of data, so that the model would be of the form <code>y = a2x^2 + a1x + a0</code> and the <code>an</code> coefficients will be provided by a model.</p>
  <h1>The problem</h1>
  <p>I don't know how to fit a polynomial curve using that package and there seem to be surprisingly few, clear references on how to do it (I've looked for a while).  I've seen <a href="https://stackoverflow.com/q/6663127/1663942">this question on doing something similar with NumPy</a>, and also <a href="https://stackoverflow.com/q/20463226/1663942">this question which does a more complicated fit than I require</a>.</p>
  <h1>What a good solution would look like</h1>
  <p>Hopefully, a good solution would go around like this (sample adapted from linear fit code that I'm using):</p>
  <pre><code>x = my_x_data.reshape(len(profile), 1)
  y = my_y_data.reshape(len(profile), 1)
  regression = linear_model.LinearRegression(degree=2) # or PolynomialRegression(degree=2) or QuadraticRegression()
  regression.fit(x, y)
  </code></pre>
  <p>I would imagine <code>scikit-learn</code> would have a facility like this, since it's pretty common (for example, in <code>R</code>, the formula for fitting can be provided in-code, and they should be able to be pretty interchangeable for that kind of use-case).</p>
  <h1>The question:</h1>
  <p>What is a good way to do this, or where can I find information about how to do this properly?</p>