Change the domain of an attribute

andkuo_7andkuo_7 MemberPosts:3Contributor I
edited December 2018 inHelp

Let's say I have a column 'Fruit' that can take the values 'a', 'b' or 'c':

ID, Fruit
1, a
2, b
3, c
4, c

and then I remove all 'Fruit' values that are equal to 'c' with a filter so that only 'a':s and 'b':s remain:

ID, Fruit
1, a
2, b

If I now go to Results -> Statistics, and look at the Values for the Fruit attribute, it will tell me

a(1), b(1), c(0).

This means the domain (i.e. the possible values the Fruit attribute can take, don't know what domain is called with RM nomenclature...) is [a, b, c]. How do I change the domain to be [a, b]? (I don't really need c anymore!)

My current workaround has been to write to a csv file after the filtering, and then read from this new csv file. But I suppose this is possible to do in a more elegant way with an operator...

Tagged:

Best Answer

  • IngoRMIngoRM Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, Community Manager, RMResearcher, Member, University ProfessorPosts:1,751RM Founder
    Solution Accepted

    Hi,

    Yes, there is an operator for that indeed :-) It is called "Remove Unused Values". The process below shows a little example.

    Hope this helps,

    Ingo























    <连接from_op = from_port“删除未使用的值”="example set output" to_port="result 1"/>





    sgenzer andkuo_7
    Sign InorRegisterto comment.