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
Feature Request....Filter example range....select last x records
hughesfleming68
Member Posts: 323 Unicorn
This is one operator that I use all the time. It is especially handy to chop off the beginning of a data set by selecting record 1 -> x and hitting invert. It is on the other hand much more involved to do from the other end of the data set. It can be done in python in one line. df = df.tail(x). Unless I have missed something all these years, I have been counting records and then building macros to create a window for the last x records. Can we have an easier/faster way to do this? I know you can sort, apply the filter and sort back but the filter example range operator should be able to work on both ends of the dataset.
regards,
Alex
regards,
Alex
Tagged:
0
Best Answer
-
hughesfleming68 Member Posts: 323 UnicornHi Janito, you need to break the problem down into pieces. The following process will do what you want. When you construct a process like this, you need to be careful of the order of the operators. Make sure that your macros are set first before you do any filtering. Let me know if this solves your problem.
regards,
Alex
Edit....I uploaded a correction. There was one extra operator that was not needed. Both rmp files should work. The smaller one is the correct one.
1
Answers
One pretty fast workaround to do that might be using EXTRACT MACRO operator and generate macro of type "number_of_examples" which then can be used in FILTER EXAMPLE RANGE operator.
Vladimir
http://whatthefraud.wtf
Hey Alex,
can you please show me an example? Iam currently stucked with this problem.
I want to erase the last examples of my database which doesnt contain a specific value. I tried to generate two macros and use filter range, but the number of rows is different in every of my tables.
Attached you will find my sample data.
Now I want to erase every example after my example value "D". I tought about using a "if then else" cause, but iam pretty new to RapidMiner and it isnt working well.
Maybe somebody can help me please?`
Greetings
Janito
i think you want to use the Filter Examples operator and filter for id > 9.
Best,
Martin
Dortmund, Germany
thank you for your answer! You helped me to solve this problem.
Have a nice day.
Greets
Janito