Collection: count atrtibutes in each object


in Help
Dear all,
I run a process in which I create a small example set in each iteration of a loop, and merge them all in the end using the Append operator
However, somewhere in the process something goes wrong and apparently some iteration ends up creating an example set with a different number of attributes, so the append operator crashes,
Now, I want to debug this and I stored the entire collection. However I have ~70 k objects in the collection and I cannot look through them by eye. I was wandering whether there was an operator that returns the number of attributes in an example set, such that I can compute it for all objects in the collection and hopefully quickly spot where the problem is?
I didn't manage to find anything useful myself, so any input from you is valuable!
Cheers,
Snežana
0
Best Answer
-
tftemme Administrator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, RMResearcher, Member Posts: 164
RM Research
Hi @s_nektarijevic,
You can use the Extract Macro operator, which can directly extract the number of attributes of an ExampleSet. Use the operator Create ExampleSet (or Generate Data by User Specification if you are on RM 9.1 or below) with eval(%{macro_name}) to get the number in a new ExampleSet-
Best regards,
Fabian5
Answers