Converting nominal to numeric
Legacy User
MemberPosts:0Newbie
I am very new to RapidMinder, and I need to convert a lot of nominal attributes to numeric. I tried Nominal2Numerical in operator in RapidMiner 4.4 hoping it would do dichotomization - but it does not, instead it seems to be doing the conversion to equidistant real numbers which does not seem to make much sense, at least in my case.
Eventually, I figured out how to do dichotomization "manually" by using ConditionedFeatureGeneration, but it gets tedious since I have to create an separate operator for each value of each attribute, and there're many.
For nominals with many possible values, I figured out how to convert them to target frequencies using ValueIterator and macros, but again it seems like I might be missing a much simpler solution.
I will appreaciate any advice!
Thanks,
~Alexei
Eventually, I figured out how to do dichotomization "manually" by using ConditionedFeatureGeneration, but it gets tedious since I have to create an separate operator for each value of each attribute, and there're many.
For nominals with many possible values, I figured out how to convert them to target frequencies using ValueIterator and macros, but again it seems like I might be missing a much simpler solution.
I will appreaciate any advice!
Thanks,
~Alexei
Tagged:
0
Answers
I think you can avoid all that horrible re-typing by using variables, or as they are termed in RM "macros". Here's what I mean...
Good luck, and good weekend!
Problem is, it adds the correct attribute at each iteratation, but does not keep it around for the next iteration. No matter if "work_on_input" is true or false, at the very end of the process, I end up with the original unmodified ExampleSource.
I guess I could rename my attributes so I can apply your suggestion directly and get rid of FeatureIterator, but I am hoping that again, I may be missing something simple...
Thanks,
~Alexei
连续的“连接”可以是一个问题,除非你使用the IteratingOperatorChain, which keeps the output. There is an example of this at work athttp://rapid-i.com/rapidforum/index.php/topic,773.0.html.
RapidMiner surely allows to find complicate solutions. Fortunately, there are often also simple ones.Just use the [tt]Nominal2Binominal[/tt] and a subsequent [tt]Nominal2Numerical[/tt] operator and you're done with the dichotomization.
Kind regards,
Tobias
Ingo