title: Get the coefficients of my sklearn polynomial regression model in Python
body: <p>I want to get the coefficients of my sklearn polynomial regression model in Python so I can write the equation elsewhere.. i.e. ax1^2 + ax + bx2^2 + bx2 + c</p>
  
  <p>I've looked at the answers elsewhere but can't seem to get the solution, unless I just don't know what I am looking at.</p>
  
  <pre><code>from sklearn.preprocessing import PolynomialFeatures
  poly_reg = PolynomialFeatures(degree = 2)
  X_poly = poly_reg.fit_transform(X_train)
  lin_reg_2 = LinearRegression()
  lin_reg_2.fit(X_poly,y_train)
  
  lin_reg_2.coef_
  </code></pre>