The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
Data Preperation--pick the 1st,2nd,3rd and 4th Higest values
Mu source table.. I have multiple dates here.. showing only one sample date
Date_Time | Load |
7/24/17 12:00 AM | 3987 |
7/24/17 1:00 AM | 3748 |
7/24/17 2:00 AM | 3608 |
7/24/17 3:00 AM | 3526 |
7/24/17 4:00 AM | 3493 |
7/24/17 5:00 AM | 3545 |
7/24/17 6:00 AM | 3683 |
7/24/17 7:00 AM | 3827 |
7/24/17 8:00 AM | 3942 |
7/24/17 9:00 AM | 3956 |
7/24/17 10:00 AM | 3985 |
7/24/17 11:00 AM | 4000 |
7/24/17 12:00 PM | 3917 |
7/24/17 1:00 PM | 3834 |
7/24/17 2:00 PM | 3901 |
7/24/17 3:00 PM | 4132 |
7/24/17 4:00 PM | 4388 |
7/24/17 5:00 PM | 4497 |
7/24/17 6:00 PM | 4675 |
7/24/17 7:00 PM | 4713 |
7/24/17 8:00 PM | 4743 |
7/24/17 9:00 PM | 4704 |
7/24/17 10:00 PM | 4540 |
7/24/17 11:00 PM | 4227 |
My Data set needs to be transformed to the below. We need to pick the 1st,2nd,3rd and 4th Higest load values and mark them accordingly
Desired Table
Date_Time | Load | Peak-1 | Peak-2 | Peak-3 | Peak-4 |
7/24/17 12:00 AM | 3987 | ||||
7/24/17 1:00 AM | 3748 | ||||
7/24/17 2:00 AM | 3608 | ||||
7/24/17 3:00 AM | 3526 | ||||
7/24/17 4:00 AM | 3493 | ||||
7/24/17 5:00 AM | 3545 | ||||
7/24/17 6:00 AM | 3683 | ||||
7/24/17 7:00 AM | 3827 | ||||
7/24/17 8:00 AM | 3942 | ||||
7/24/17 9:00 AM | 3956 | ||||
7/24/17 10:00 AM | 3985 | ||||
7/24/17 11:00 AM | 4000 | ||||
7/24/17 12:00 PM | 3917 | ||||
7/24/17 1:00 PM | 3834 | ||||
7/24/17 2:00 PM | 3901 | ||||
7/24/17 3:00 PM | 4132 | ||||
7/24/17 4:00 PM | 4388 | ||||
7/24/17 5:00 PM | 4497 | ||||
7/24/17 6:00 PM | 4675 | 1 | |||
7/24/17 7:00 PM | 4713 | 1 | |||
7/24/17 8:00 PM | 4743 | 1 | |||
7/24/17 9:00 PM | 4704 | 1 | |||
7/24/17 10:00 PM | 4540 | ||||
7/24/17 11:00 PM | 4227 |
Tagged:
0
Answers
Hi,
the attached process should do the trikc. Not sure if you can do this with less opertors.
Best,
Martin
Dortmund, Germany
Interesting problem. Your data structure requirements are somewhat unsual, can you explain more why you need this particular structure?
Your orginal post is somewhat ambiguous, do you want the 4 peak loads defined for each date in your dataset, or do you want the peaks across all dates? Martin's example process will do it across all dates, but if you want it for each date then you would need modifications.
Not knowing exactly what your specified data structure is meant to convey, I myself would probably approach this differently. If the times are recorded at regular intervals then I would probably pivot this data grouping by date and making the time the index value. That will give you a dataset with each row as a unique date and each time as a column with the respective load value. From that point you could do additional transformations to get the 4 peaks for each row. But what is the purpose of this transformation?
Lindon Ventures
Data Science Consulting from Certified RapidMiner Experts