pydata / patsy

Describing statistical models in Python using symbolic formulas
Other
956 stars 104 forks source link

How to construct a polynomial for numerical data? #152

Open Alalalalaki opened 5 years ago

Alalalalaki commented 5 years ago

For example I have some variables "x1, x2, x3, ...", and want all polynomials with a simple choice on the degree. The only solution I know so far is by using preprocessing.PolynomialFeatures in sklearn. But I can't see why it cannot be done simply in patsy.

Thanks.