Hope this helpsI think it might generate a basis that is capable of generating what you describe above, but feature expansion concretely reads as1, a, b, c, a ** 2, ab, ac, b ** 2, bc, c ** 2, a ** 3, a ** 2 * b, a ** 2 * c, a* b ** 2, abc, a*c**2, b**3, b**2 * c, b*c**2, c**3_______________________________________________On Fri, Nov 22, 2019 at 8:50 AM Sole Galli <solegalli1@gmail.com> wrote:_______________________________________________Hello team,Can I double check with you that I understand correctly what the PolynomialFeatures() is doing under the hood?If I set it like this:poly = PolynomialFeatures(degree=3, interaction_only=False, include_bias=False)and I fit it on a dataset with 3 variables, a,b and c.Am I correct to say that the fit() method creates all possible combinations like this:a;b;c;(a+b)^2(a+b)^3(a+c)^2(a+c)^3(c+b)^2(c+b)^3(a+b+c)^2(a+b+c)^3And the transform() generates the expansion, without the constant that multiplies the interactions and avoiding duplicated terms after the expansion?Thanks for the help.Kind regardsSole
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn