on-the-fly attribute conversion (xxx2String)

rpanizzarpanizza MemberPosts:5Contributor II
edited November 2018 inHelp
Hi.
There are several nodes to convert an attribute after the loading (Numeric2Polynomial, Numeric2Binomial and so on).
So, how can I convert some columns to string type?
According to me, this is useful because I want to group by data by 2 or more columns and in order to do this I would create a new column that is the pipe of the 2 or more group by columns.

Finally: where can I find a list of function such as +, *, sin, conversion functions...

Answers

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

    since you already found the operator Numeric2Polynominal I am assuming that you have something different in mind. Could you give a small example what you want to achieve? I am not sure if I totally got your point.

    Finally: where can I find a list of function such as +, *, sin, conversion functions...
    有一个运营商在“FeatureGeneration Preprocessing" -- "Attributes" -- "Generation" group. Most mathemtical functions supported by Java are also supported by this operator:

    "+", "-", "*", "/", "1/", "sin", "cos", "tan", "atan", "exp", "log", "min", "max", "floor", "ceil", "round", "sqrt", "abs", "sgn", "pow"

    Constant values are also defined as a function in the format "const[5]()" which represents the constant "5".

    The next release (or one of the next ones) will also provide an operator for string-based constructions like substrings etc.

    Cheers,
    Ingo

  • rpanizzarpanizza MemberPosts:5Contributor II
    mierswa wrote:

    Hi,

    since you already found the operator Numeric2Polynominal I am assuming that you have something different in mind. Could you give a small example what you want to achieve? I am not sure if I totally got your point.
    I want to perform this operation (for example):
    to sum a variable (say VEND) by other 2 variables (BRAND and FAMI).
    the sql equivalent is:
    select brand, fami, sum(vend) as totvend from tab1 group by brand, fami
    In order to do this I want to create a column equal to the concatenation of the value of columns BRAND and FAMI (I need the concatenated column becauserapid miner don't allow to group by with more than one column)

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

    ah, thanks. Now I see. This is actually possible with the AttributeMerge operator like in the following example (the first 80% of the example are just to create a data set similar to yours):






















































    <参数键= " second_attribute " value = "全家" / >









    By the way: we already added multiple aggregations and groups to our todo list...

    Cheers,
    Ingo
Sign InorRegisterto comment.