Hi,
   is there a way to take a dataset and extract numeric columns and create interaction columns from it automatically?

   For e.g.  there are 5 columns of data: A,B,C,D,E.

   CDE are numeric.

   Can someone provide code to automatically create more columns such as:

   1) C*D, C*E, C*D*E, (C+E)/(D+.01 (to avoid divide by zero), (D+E)/(C+.01 (to avoid divide by zero), (C+D)/(E+.01 (to avoid divide by zero))

?

I know in glm multiplying can create terms but i want the columns to be part of the data set so that i can feed this into Random forest to pick out predictive interaction terms as regression cannot reliably handle correlated interaction terms.

if anyone has some simple code that can do this that would be helpful.

thanks
Dhruv
    

	[[alternative HTML version deleted]]

