Search code examples
splitrapidminer

Rapidminer, how to split column?


I have a table like this:

id      | animals       | 
------- |:-------------:| 
1       | cat, dog, fish| 
2       | dog           |
3       | cat,          | 
4       |               |
5       | fish, cat     | 
6       | dog           |

etc .. The only possible value in animal column, is cat, dog, fish or nothing.

And i would like to have table like this:

id     | cat | dog |fish|
------ |:----|-----|----|
1      | 1   |1    |1   |  
2      |     |1    |    |
3      | 1   |     |    | 
4      |     |     |    |
5      | 1   |     |1   | 
6      |     |1    |    |

Is there any way how to do this in RapidMiner.


Solution

  • Yes there is a way

    You can use Nominal Value Modificatior called Split The parameters should be set like this:
    attribute filter type: single
    attribute : animal
    split pattern : ,
    split mode : unordered_split

    Be sure that input animal is configured as nominal attribute.