Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

using featuretools to create "time window features"

I was trying to automate the creation of "row window features", using featuretools package but I couldn't find an easy way to create them. What I mean with "row window features" is that for each cutoff point I want to create features that extract time patterns. for example:

[columns] 
COUNT(orders) in 0to1 days    
COUNT(orders) in 1to2 days
COUNT(orders) in 2to3 days 
COUNT(orders) in 0to1 months    
...

I understand that there is a way to limit the "time window" for the features using the training_window parameter in ft.dfs(), but that's only a "lower bound" it's there an easy way to create that kind of features ?.

like image 713
Pablo Avatar asked Nov 24 '25 08:11

Pablo


1 Answers

You can accomplish it by using multiple cutoff times to set the "upper bound" of time. However, then your feature values for COUNT(orders) in 0to1 days, COUNT(orders) in 1to2 days, etc will be on the rows. You would then reshape the resulting dataframe to have them in the columns.

like image 91
Max Kanter Avatar answered Nov 26 '25 20:11

Max Kanter



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!