generate attribute

michaelglovenmichaelgloven RapidMiner Certified Analyst, MemberPosts:46Guru
edited December 2018 inHelp

Probably a simple question, but I could not find relevant documentation. What is the correct syntax in Generate Attributes for combining multiple attributes into one? For example, how do I combine a numerical, nominal and date field to give me a new attribute field that looks like this: "2015 - Excellent - March 2015" as the new concatenated field? The attribute fields are 2015 (integer [field 1]), Excellent (nominal [field 2]) and March 2015 (date [field 3])...

thanks in advance!

Best Answer

  • lionelderkrikorlionelderkrikor Moderator, RapidMiner Certified Analyst, MemberPosts:1,195Unicorn
    Solution Accepted

    Hi again@michaelgloven,

    Have you try theGenerate Concatenationoperator ?

    Here an example :

    Regards,

    Lionel




































    < portSpacing端口= " sink_result 1" spacing="0"/>
    < portSpacing端口= " sink_result 2" spacing="0"/>
    < portSpacing端口= " sink_result 3" spacing="0"/>
    < portSpacing端口= " sink_result 4" spacing="0"/>



    Telcontar120 sgenzer

Answers

  • lionelderkrikorlionelderkrikor Moderator, RapidMiner Certified Analyst, MemberPosts:1,195Unicorn

    Hi@michaelgloven,

    Here an example of a process that can maybe meet your needs ? :










































    <连接from_op = " Join" from_port="join" to_port="result 1"/>

    < portSpacing端口= " sink_result 1" spacing="0"/>
    < portSpacing端口= " sink_result 2" spacing="0"/>



    Regards,

    Lionel

    sgenzer
  • Telcontar120Telcontar120 Moderator, RapidMiner Certified Analyst, RapidMiner Certified Expert, MemberPosts:1,635Unicorn

    There is a CONCAT function in Generate Attributes, but it will work only with nominals, so you need to first turn your other attributes (or copies of them if you want to keep the originals) into nominal form, using Date to Nominal and Numeric to Nominal.

    Brian T.
    Lindon合资企业
    Data Science Consulting from Certified RapidMiner Experts
    sgenzer
  • michaelglovenmichaelgloven RapidMiner Certified Analyst, MemberPosts:46Guru

    ah, I was not aware of this specific operator...thanks, it solves my issue!

    Mike

    sgenzer
  • Telcontar120Telcontar120 Moderator, RapidMiner Certified Analyst, RapidMiner Certified Expert, MemberPosts:1,635Unicorn

    Neither was I---and it's always amazing to find these little nuggets after using RapidMiner for so many years!

    Brian T.
    Lindon合资企业
    Data Science Consulting from Certified RapidMiner Experts
    sgenzer lionelderkrikor
  • lionelderkrikorlionelderkrikor Moderator, RapidMiner Certified Analyst, MemberPosts:1,195Unicorn

    Hi,

    I'm using RapidMiner since a few months and I assure you, I discovered this operator today too :

    When I saw this post, I decided to type "concat" in the operator search box and "Generate Concatenation" operator appeared "as if by magic"...

    Best regards,

    Lionel

    sgenzer
  • sgenzersgenzer Administrator, Moderator, Employee, RapidMiner Certified Analyst, Community Manager, Member, University Professor, PM ModeratorPosts:2,959Community Manager

    stay tuned - we're about to put that search box on steroids.:)


    Scott

    lionelderkrikor
  • Thomas_OttThomas_Ott RapidMiner Certified Analyst, RapidMiner Certified Expert, MemberPosts:1,761Unicorn

    @sgenzer,@lionelderkrikor,@Telcontar120, I had to use Generate Concatentation once and boy was it handy. It's like that wierd tool in your tool box that just sits there forever and you wonder why you bought it in the first place. Then you need it one day and boy were to glad it was there.

    sgenzer lionelderkrikor
  • sgenzersgenzer Administrator, Moderator, Employee, RapidMiner Certified Analyst, Community Manager, Member, University Professor, PM ModeratorPosts:2,959Community Manager

    Hmm I have not found that operator extremely handy - it only handles two atts at a time. It would be FAR more useful if you could expand. I almost always use concat() in Generate Attributes.

    Scott

Sign InorRegisterto comment.