Due to recent updates, all users are required to create an Altair One account to login to the RapidMiner community. Click the Register button to create your account using the same email that you have previously used to login to the RapidMiner community. This will ensure that any previously created content will be synced to your Altair One account. Once you login, you will be asked to provide a username that identifies you to other Community users. Email us at Community with questions.
LG01:Take and copy the value of a cell of an attribute
Best Answers
-
Telcontar120 RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,635 UnicornYes, based on your explanation it sounds like what you want to do can be done using Extract Macro or Generate Macro and then Generate Attributes. But if you post a sample process and dataset it would be easier to tell for sure.4
-
lionelderkrikor RapidMiner Certified Analyst, Member Posts: 1,195 UnicornHi @LG01,
You can find here a process which performs what you want to do :<?xml version="1.0" encoding="UTF-8"?><process version="9.2.001"> <context> <input/> <output/> <macros/> </context> <operator activated="true" class="process" compatibility="9.2.001" expanded="true" name="Process"> <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="read_excel" compatibility="9.2.001" expanded="true" height="68" name="Read Excel" width="90" x="112" y="85"> <parameter key="excel_file" value="C:\Users\Lionel\Documents\Formations_DataScience\Rapidminer\Tests_Rapidminer\Extract_macro_compare\data.xlsx"/> <parameter key="sheet_selection" value="sheet number"/> <parameter key="sheet_number" value="1"/> <parameter key="imported_cell_range" value="A1"/> <parameter key="encoding" value="SYSTEM"/> <parameter key="first_row_as_names" value="true"/> <list key="annotations"/> <parameter key="date_format" value=""/> <parameter key="time_zone" value="SYSTEM"/> <parameter key="locale" value="English (United States)"/> <parameter key="read_all_values_as_polynominal" value="false"/> <list key="data_set_meta_data_information"> <parameter key="0" value="A.true.polynominal.attribute"/> <parameter key="1" value=" Temperature .true.real.attribute"/> <parameter key="2" value="C.true.polynominal.attribute"/> </list> <parameter key="read_not_matching_values_as_missings" value="false"/> <parameter key="datamanagement" value="double_array"/> <parameter key="data_management" value="auto"/> </operator> <operator activated="true" class="read_excel" compatibility="9.2.001" expanded="true" height="68" name="Read Excel (2)" width="90" x="112" y="187"> <parameter key="excel_file" value="C:\Users\Lionel\Documents\Formations_DataScience\Rapidminer\Tests_Rapidminer\Extract_macro_compare\order.xlsx"/> <parameter key="sheet_selection" value="sheet number"/> <parameter key="sheet_number" value="1"/> <parameter key="imported_cell_range" value="A1"/> <parameter key="encoding" value="SYSTEM"/> <parameter key="first_row_as_names" value="true"/> <list key="annotations"/> <parameter key="date_format" value=""/> <parameter key="time_zone" value="SYSTEM"/> <parameter key="locale" value="English (United States)"/> <parameter key="read_all_values_as_polynominal" value="false"/> <list key="data_set_meta_data_information"> <parameter key="0" value="A.true.polynominal.attribute"/> <parameter key="1" value="B.true.polynominal.attribute"/> <parameter key="2" value="C.true.polynominal.attribute"/> <parameter key="3" value="D.true.polynominal.attribute"/> <parameter key="4" value="E.true.polynominal.attribute"/> <parameter key="5" value="F.true.polynominal.attribute"/> </list> <parameter key="read_not_matching_values_as_missings" value="false"/> <parameter key="datamanagement" value="double_array"/> <parameter key="data_management" value="auto"/> </operator> <operator activated="true" class="extract_macro" compatibility="9.2.001" expanded="true" height="68" name="Extract Macro" width="90" x="246" y="187"> <parameter key="macro" value="maxTemperature"/> <parameter key="macro_type" value="data_value"/> <parameter key="statistics" value="average"/> <parameter key="attribute_name" value="D"/> <parameter key="example_index" value="1"/> <list key="additional_macros"/> </operator> <operator activated="true" class="generate_attributes" compatibility="9.2.001" expanded="true" height="82" name="Generate Attributes" width="90" x="246" y="85"> <list key="function_descriptions"> <parameter key="test_statut" value="if(Temperature<eval(%{maxTemperature}),"True","False")"/> </list> <parameter key="keep_all" value="true"/> </operator> <operator activated="true" class="filter_examples" compatibility="9.2.001" expanded="true" height="103" name="Filter Examples" width="90" x="380" y="85"> <parameter key="parameter_expression" value=""/> <parameter key="condition_class" value="custom_filters"/> <parameter key="invert_filter" value="false"/> <list key="filters_list"> <parameter key="filters_entry_key" value="test_statut.equals.False"/> </list> <parameter key="filters_logic_and" value="true"/> <parameter key="filters_check_metadata" value="true"/> </operator> <connect from_op="Read Excel" from_port="output" to_op="Generate Attributes" to_port="example set input"/> <connect from_op="Read Excel (2)" from_port="output" to_op="Extract Macro" to_port="example set"/> <connect from_op="Extract Macro" from_port="example set" to_port="result 2"/> <connect from_op="Generate Attributes" from_port="example set output" to_op="Filter Examples" to_port="example set input"/> <connect from_op="Filter Examples" 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"/> <portSpacing port="sink_result 3" spacing="0"/> </process> </operator> </process>
Hope this helps,
Regards,
Lionel
6 -
varunm1 Member Posts: 1,207 UnicornHello @LG01
You need to open a new process in RM. Then Copy and paste this process in XML window. You can find XML window by choosing View --> Show Panel --> XML. Once you copy and paste this entire XML code, you need to click on green tick mark available on XML window. It will show you the process, then you need to connect your data in the process.Regards,
Varun
https://www.varunmandalapu.com/Be Safe. Follow precautions and Maintain Social Distancing
1
Answers
Thank you Telcontar 120 for your answer. Actually, I would like to take the first condition of the file order (<29), create an attribute that contains the value 29 on all its lines then join the data table in order to compare row by row the condition <29 and display the lines for which the condition is false
Thank you very much