How to automatically aggregate the numerial value of every 10/20/30... coloums

User: "cindyliu_au"
New Altair Community Member
Updated by Jocelyn
the original data: 300 attributes: from day1 to day300



I need create 3 datasets with generating features (each row is still each student (id))

dataset1: feature generation: aggregate every 10 days, resulting in 30 attributes (day1-10, day11-20...)
dataset2: feature generation: aggregate every 20 days, resulting in 15 attributes (day1-20, day21-40...)
dataset3: feature generation: aggregate every 30 days, resulting in 10 attributes (day1-30, day31-60...)

I know I can use generate attribute operator then manually select day1 to day10, then day11 to day20...
but I want to know how to automatically generate these aggregated features?

Thank you!

Find more posts tagged with

Sort by:
1 - 1 of 11
    User: "BalazsBaranyRM"
    New Altair Community Member
    Accepted Answer
    Hi!

    Here's an automatic solution. It transposes a copy of the data, so you have day1-dayN in rows. Then it processes these in batches using Loop Batches. You just enter the number of elements in a batch in the batch size parameter. I tested with different values, it works with every setting >= 2.

    Inside the batch, the process generates a macro for selecting the dayX attributes, generates a name like day1-dayN and executes Generate Aggregation with this regular expression based attribute filter. 

    Regards,
    Balázs