Polynomial Features Memory Usage

Hi guys,

After having a lot of memory issues with PolynomialsFeatures, I modify the transform function in order to significantly decrease the memory consumption. In the example file, the memory consumption of the old and proposed transform functions are compared. The results shown that for the example below, the memory consumption decreases from 3455 MiB to 374 MiB, without increasing the execution time.