"Loop / Attributes not found"

bherwigbherwig MemberPosts:1Contributor I
edited June 2019 inHelp
Hello everybody!

I try to access attributes via the Loop Attributes operator.
My dataset consists of only two attributes, but many examples.

Within the loop I want to do a FFT (from the Series extension) on every series I built from the examples.
So in the Data to Series operator (located within the loop), I access every attribute by the macro's name (here: %{loop_attributes}). In the metadata, "att1" and "att2" as attribute-names are visible. But the Data to Series operator complains about not being able to find "att2".

Can someone please have a look at my process (see below) and hint me to a solution?

Thank you a lot for any advice!

Yours
Benjamin
























<连接from_op = "三星es To Data" from_port="example set" to_port="example set"/>












Answers

  • awchisholmawchisholm RapidMiner Certified Expert, MemberPosts:458Unicorn
    Hello

    The output from one iteration of the series to data operator is used as the input to the next iteration of the data to series operator. This does not contain the attribute att2 so the process fails.

    Disconnect the link from the output to the exit point of the loop operator.

    Of course the problem is then to save the results. One approach is to store them in memory or the repository inside the loop and recall outside.

    Hope that helps

    regards

    Andrew
  • MariusHelfMariusHelf RapidMiner Certified Expert, MemberPosts:1,869Unicorn
    安德鲁是正确行为的循环。To store the result you can do something as in the process below. The idea is to store the result in memory with the Remember operator, and join the new result with the Join operator. In the first operator there is nothing stored yet in memory, so the Recall operator fails. In that case the exception is caught by Handle Exception, which then just passes the input example set to its output.
    For the join to work, we need an ID, which is generated by Generate ID.

    After the execution of Loop Attributes, the result is Recalled from memory and pased to the process output.

    Note that I replaced your retrieve operator with generate data since I obviously can't access any data from your repository:)

    Best, Marius


























































    <连接from_op = "三星es To Data" from_port="example set" to_op="Generate ID" to_port="example set input"/>


















Sign InorRegisterto comment.