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.
loop example problem
I am a bit stuck with the loop example operator, so if someone can tell me what I am doing wrong here it would be great.
I have a example set with urls, and each url should be crawled and stored, but I am only able to fetch the last one. Find below simplified process :
What am I overlooking ? How can I get the actual attribute value of the current itteration ?
I have a example set with urls, and each url should be crawled and stored, but I am only able to fetch the last one. Find below simplified process :
<?xml version="1.0" encoding="UTF-8" standalone="no"?>running this will give me my original url, but for every example I get the last value in the example set, where I was expecting the value for the given index (macro value e in this example)
<process version="6.4.000">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="6.4.000" expanded="true" name="Process">
<process expanded="true">
<operator activated="true" class="retrieve" compatibility="6.4.000" expanded="true" height="60" name="Retrieve tv" width="90" x="45" y="30">
<parameter key="repository_entry" value="crawler/links"/>
</operator>
<operator activated="true" class="loop_examples" compatibility="6.4.000" expanded="true" height="76" name="Loop Examples (2)" width="90" x="179" y="30">
<parameter key="iteration_macro" value="e"/>
<process expanded="true">
<operator activated="true" class="extract_macro" compatibility="6.4.000" expanded="true" height="60" name="Extract Macro (2)" width="90" x="112" y="30">
<parameter key="macro" value="href"/>
<parameter key="macro_type" value="data_value"/>
<parameter key="attribute_name" value="href"/>
<parameter key="example_index" value="%{e}"/>
<list key="additional_macros">
<parameter key="date" value="date"/>
</list>
</operator>
<operator activated="true" class="generate_attributes" compatibility="6.4.000" expanded="true" height="76" name="Generate Attributes (2)" width="90" x="246" y="30">
<list key="function_descriptions">
<parameter key="link" value="macro("href")"/>
<parameter key="index" value="macro("e")"/>
</list>
</operator>
<connect from_port="example set" to_op="Extract Macro (2)" to_port="example set"/>
<connect from_op="Extract Macro (2)" from_port="example set" to_op="Generate Attributes (2)" to_port="example set input"/>
<connect from_op="Generate Attributes (2)" from_port="example set output" to_port="example set"/>
<portSpacing port="source_example set" spacing="0"/>
<portSpacing port="sink_example set" spacing="0"/>
<portSpacing port="sink_output 1" spacing="0"/>
</process>
</operator>
<connect from_op="Retrieve tv" from_port="output" to_op="Loop Examples (2)" to_port="example set"/>
<connect from_op="Loop Examples (2)" 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>
What am I overlooking ? How can I get the actual attribute value of the current itteration ?
Tagged:
0
Answers
this one should work better: Loop Examples is giving you the full example set each time. The upper most port is given to you in the next iteration. The lower ports are the output ports.
~Martin
Dortmund, Germany