I want to loop on couples of attributes and create a new one given by an operation on them

erikapastorellierikapastorelli MemberPosts:1Learner I
edited December 2018 inHelp

Hi everyone! I've a problem on Rapidminer 5.Attached is my dataset.



From the fourth column over i have to generate a new attribute starting from the couple x-1,x-0, y-1,y-0.





For example A2A.MI-1 and A2A.MI-0 have to became a new attribute where I got the quotien between them.

How can i solve? I tried loop on attributed and script but I failed.

Thank you very much

dataset.PNG 22.9K

Answers

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

    Hi@erikapastorelli,

    Here an example of process usingExecute Pythonoperator to perform what you want to do :







































    这里的Excel文件的提取数据et (which I used to create this process) :

    https://drive.google.com/open?id=1s1AvmN0H_zZF3zgi0CnMlFPjar-qMxFD

    I hope it helps,

    Regards,

    Lionel

    NB : There is just a problem : after execution of the Python script, the date attribute is set to "?", and i don't know why....

    NB2 : I thing it is possible to improve this Python script, to give more explicit name to the generated attributes.

    sgenzer
Sign InorRegisterto comment.