Return collection with "Loop Attribute"?
Hi,
Apologies if this has been answered elsewhere. But I have been trying to build a nested loop operator, that works over examples and attributes, treating each attribute as a separate case.
Standard loop works fine for processing examples, collections are returned as appropriate. Loop attribute, however, does not build collections and instead returns only the last processed table.
Is that supposed to be how it works? If so, any advice on getting "loop attribute" to build collections, in a fashion identical to the standard loop operator?
Thanks in advance!
Best Answers
-
Thomas_Ott RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,761 Unicorn
Have you tried using the Append operator right after the loop?
0 -
bhupendra_patil Employee-RapidMiner, Member Posts: 168 RM Data Scientist
try connecting the output to res port inside and then the res port of the "loop attributes" will deliver hte collection as you probably need
0
Answers
Hi,
Thanks for the solutions. Using the res port solved the problem beautifully. Append then merged the collection just fine.
One minor hicup was that some example sets were empty, which Append didnt like.
I resolved this by using "loop collection" with "branch". The branch condition was set to "min_examples = 1", with "else" set to NOT pass the example set. This effectively filtered out blank example sets, fixing the problem with append.
Thanks!