title: How do I make sense of the polynomial coefficients my program outputs?
body: <p>I am trying to obtain the polynomial equation of a surface which represents 4 variables: Leakage, pressure,dimension and speed. Basically I am trying to find the equation Leakage=f(pressure, dimension, speed). I managed to get polynomial coefficients and the intercept as shown below this post, but I don't know how to interpret them in a polynomial equation(ie: z= ao + alx + a2Y + a3XY + a4x2 + a5y2 + a6 x3 + a7x2 y + a8 x y2 + ag, etc.). Can someone help plz?:</p>
  <pre><code>from sklearn.preprocessing import PolynomialFeatures
  from sklearn.linear_model import LinearRegression
  
  # my data 
  data=np.column_stack((speed, dimension3,pressure3,leakage3))
  
  # Generate polynomial features of desired degree
  d = 6
  poly = PolynomialFeatures(degree=d, include_bias=False)
  X = poly.fit_transform(data[:, :-1])
  y = data[:,-1] 
  
  # Define and fit linear regression 
  clf = LinearRegression()
  clf.fit(X, y)
  
  # Check results
  print(clf.coef_)
  print(clf.intercept_)
  </code></pre>
  <pre><code>[ 1.21064489e-09  2.51751918e-11  3.17543952e-12 -3.66443110e-13
   -3.62188623e-14  1.13794085e-14  2.33351780e-15  8.76551176e-16
    9.65867527e-16  6.69545284e-16 -1.67396381e-16 -1.57313479e-16
   -8.47927583e-17 -3.38219081e-16  1.83324692e-17 -3.10419931e-16
    1.43757683e-16 -2.25732234e-16 -2.37769462e-16 -1.25305377e-18
    4.30862718e-18 -3.03569002e-16  6.43054057e-19  2.88496876e-15
    2.13470938e-14  3.85650361e-20  4.65962202e-16 -2.18466792e-13
   -2.30089604e-13 -4.53158981e-22  3.96214571e-17  6.38462456e-13
    1.48896917e-12  1.52973108e-13 -1.18405974e-14  4.30024113e-15
   -2.52978182e-13  5.34046635e-16  2.40414556e-12  1.77892418e-11
    3.60577799e-17  3.88296991e-13 -1.82055655e-10 -1.91741331e-10
   -4.76611883e-19  3.30372428e-14  5.32052044e-10  1.24080759e-09
    1.27477605e-10  2.12356214e-18  1.47504991e-15  1.81132053e-10
    3.25304547e-10  7.36098343e-11  1.75235266e-11  2.36581268e-18
   -6.40351208e-19  4.91896560e-17 -1.01893976e-17 -3.16647219e-16
   -3.52899091e-15  1.99753728e-16 -6.70331612e-15  3.37679794e-14
    3.84231696e-14 -1.53920338e-15  1.15182270e-13 -1.08869747e-14
   -3.29823619e-13  8.93971247e-14  2.18311227e-15 -8.17692841e-13
   -4.15197656e-13 -3.45795442e-12  1.67485115e-11 -2.44352687e-11
    2.13680892e-15  1.46360317e-12  1.90178331e-12 -4.17133327e-11
    2.89651154e-10 -1.07175872e-09  1.32403379e-09]
  9.16822354513272
  </code></pre>