polynomial regression in example set
ga34hox
New Altair Community Member
Hello everybody,
i did an Polynomial Regression with RapidMiner. As a result i got an specific function. Does anybody know, how i will get the function into an example set?
Thank you so much.
Regards
ga34hox
Tagged:
0
Best Answer
-
Hi @ga34hox,
the only way i know is to use groovy. Attached is a process showing it.
BR,
Martin
<?xml version="1.0" encoding="UTF-8"?><process version="8.2.000">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="8.2.000" expanded="true" name="Process">
<process expanded="true">
<operator activated="true" class="generate_data" compatibility="8.2.000" expanded="true" height="68" name="Generate Data" width="90" x="45" y="34"/>
<operator activated="true" class="polynomial_regression" compatibility="8.2.000" expanded="true" height="82" name="Polynomial Regression" width="90" x="246" y="34"/>
<operator activated="true" class="execute_script" compatibility="8.2.000" expanded="true" height="82" name="Execute Script" width="90" x="380" y="34">
<parameter key="script" value="import com.rapidminer.operator.text.Document; IOObject inputData = input[0]; // You can add any code here // This line returns the first input as the first output return new Document(inputData.toString());"/>
</operator>
<operator activated="true" class="text:documents_to_data" compatibility="8.1.000" expanded="true" height="82" name="Documents to Data" width="90" x="514" y="34">
<parameter key="text_attribute" value="formula"/>
</operator>
<connect from_op="Generate Data" from_port="output" to_op="Polynomial Regression" to_port="training set"/>
<connect from_op="Polynomial Regression" from_port="model" to_op="Execute Script" to_port="input 1"/>
<connect from_op="Execute Script" from_port="output 1" to_op="Documents to Data" to_port="documents 1"/>
<connect from_op="Documents to Data" from_port="example set" 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>2
Answers
-
Hi @ga34hox,
the only way i know is to use groovy. Attached is a process showing it.
BR,
Martin
<?xml version="1.0" encoding="UTF-8"?><process version="8.2.000">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="8.2.000" expanded="true" name="Process">
<process expanded="true">
<operator activated="true" class="generate_data" compatibility="8.2.000" expanded="true" height="68" name="Generate Data" width="90" x="45" y="34"/>
<operator activated="true" class="polynomial_regression" compatibility="8.2.000" expanded="true" height="82" name="Polynomial Regression" width="90" x="246" y="34"/>
<operator activated="true" class="execute_script" compatibility="8.2.000" expanded="true" height="82" name="Execute Script" width="90" x="380" y="34">
<parameter key="script" value="import com.rapidminer.operator.text.Document; IOObject inputData = input[0]; // You can add any code here // This line returns the first input as the first output return new Document(inputData.toString());"/>
</operator>
<operator activated="true" class="text:documents_to_data" compatibility="8.1.000" expanded="true" height="82" name="Documents to Data" width="90" x="514" y="34">
<parameter key="text_attribute" value="formula"/>
</operator>
<connect from_op="Generate Data" from_port="output" to_op="Polynomial Regression" to_port="training set"/>
<connect from_op="Polynomial Regression" from_port="model" to_op="Execute Script" to_port="input 1"/>
<connect from_op="Execute Script" from_port="output 1" to_op="Documents to Data" to_port="documents 1"/>
<connect from_op="Documents to Data" from_port="example set" 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>2