The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
How can i do to change integer values in more than 1 attribute?
I have an example set with 5 attributes that are number in a reduce scale of thounsands, i want to multiply all the values for 1000. For example: the value is 20, but i want to do 20*1000 and i want to do that in all the values of 5 attributes. Can you help me? Thanks in advanced
0
Best Answer
-
IngoRM
Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, Community Manager, RMResearcher, Member, University Professor Posts: 1,751
RM Founder
And you can place the Generate Attributes inside of a Loop Attributes if you want to automate the multiplication for all columns (I guess with 5 you can also use 5 Generate Attributes, but, you know, it's cooler with a loop
) 8
Maven
Answers
If I good understand, you will need of Generate Attributes operator for this task.
The name of the generated attribute has to be strictly the same that the name of the original attribute.
Hope this helps,
Regards,
Lionel
You don't need five generate attribute operators, you can create all of them in one. Here is the XML code for you to check.
<?xml version="1.0" encoding="UTF-8"?><process version="9.4.001"> <context> <input/> <output/> <macros/> </context> <operator activated="true" class="process" compatibility="6.0.002" expanded="true" name="Process" origin="GENERATED_TUTORIAL"> <parameter key="logverbosity" value="init"/> <parameter key="random_seed" value="2001"/> <parameter key="send_mail" value="never"/> <parameter key="notification_email" value=""/> <parameter key="process_duration_for_mail" value="30"/> <parameter key="encoding" value="SYSTEM"/> <process expanded="true"> <operator activated="true" class="retrieve" compatibility="9.4.001" expanded="true" height="68" name="Retrieve Polynomial" width="90" x="112" y="85"> <parameter key="repository_entry" value="//Samples/data/Polynomial"/> </operator> <operator activated="true" breakpoints="before,after" class="generate_attributes" compatibility="9.4.001" expanded="true" height="82" name="Generate Attributes" width="90" x="313" y="85"> <list key="function_descriptions"> <parameter key="a1" value="a1*1000"/> <parameter key="a2" value="a2*1000"/> <parameter key="a3" value="a3*1000"/> <parameter key="a4" value="a4*1000"/> <parameter key="a5" value="a5*1000"/> </list> <parameter key="keep_all" value="false"/> </operator> <connect from_op="Retrieve Polynomial" from_port="output" to_op="Generate Attributes" to_port="example set input"/> <connect from_op="Generate Attributes" from_port="example set output" to_port="result 1"/> <portSpacing port="source_input 1" spacing="0"/> <portSpacing port="sink_result 1" spacing="0"/> <portSpacing port="sink_result 2" spacing="0"/> </process> </operator> </process>Varun
https://www.varunmandalapu.com/
Be Safe. Follow precautions and Maintain Social Distancing
Thanks!