Why does the Split operator not keep the values?

Member Posts: 18 Contributor II
edited April 21 in Help
Hello everyone,

As usual, I have quite a simple task to do but I haven't found an easy answer to it yet.

Let's say I have that Example Set:
 Sale Clients Product A x CCD B x ; y CCD C y CS D y CCD E x ; z DU F x ; y ; z CS G y ; z DU

And I want to split it to get that new Example Set:
 Sale Clients Product A x CCD B x CCD B y CCD C y CS D y CCD E x DU E z DU F x CS F y CS F z CS G y DU G z DU

What I thought first was: "Hey! You can do that! Let's do a Transpose, then a Split, and a Transpose again!" But this is what I get:
 Sale Clients Product ? y ? ? z ? ? y ? ? z ? ? z ? A x CCD B x CCD C y CS D y CCD E x DU F x CS G y DU

Why did the Split operator not keep the values associated to the split examples? And what can I do to keep them?

I'm sorry if my question is obvious: I'm still exploring RapidMiner

Thanks a lot and best to all,
Sylvain
Tagged:

• Member Posts: 18 Contributor II
Solution Accepted
Hello Ingo,

Your solution works perfectly well! It is short and clear, as I like

Thank you soooo much! I'm learning a lot with you help.

Best,
Sylvain

• Member Posts: 18 Contributor II
Update

Hello everyone,

After an hour of thought, I now understand why I got that result: Split gives an empty value if there is nothing to split; it doesn't copy the example.

It does not solve my problem, however, which is to copy the example when there's nothing to split... Any advice on that point?

Thanks a lot for your help
Sylvain
• Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, Community Manager, RMResearcher, Member, University Professor Posts: 1,749  RM Founder
Nice challenge
The process below should do the trick.  I have used a combination of Split, De-Pivot, and Filter Examples.  The other two operators are simply used to make the result look nicer / exactly like your example above...
Hope this helps,
Ingo
P.S.: If anybody finds a shorter solution pls let me know - I only spend 5 minutes on this but I somehow feel that there is something shorter out there...
`<?xml version="1.0" encoding="UTF-8"?><process version="9.3.000-BETA2">`
• 12Administrator, Moderator, Employee, RapidMiner Certified Analyst, Community Manager, Member, University Professor, PM Moderator Posts: 2,952  Community Manager
@SylvainM pls mark as solution. Thank you!