"Can I break the loop attributes prematurely?"

韦塞尔韦塞尔 MemberPosts:537Guru
edited June 2019 inHelp
Dear all,

Can I break the loop attributes prematurely?
Alternatively, can I use some other loop operator that builds the resulting dataset in a similar way to loop attributes?

E.g.
Loop over all attributes, unless a certain amount of time has passed, then stop the loop and continue the process.

Best regards,

Wessel

Answers

  • awchisholmawchisholm RapidMiner Certified Expert, MemberPosts:458Unicorn
    Hello

    The Loop operator has a "limit time" option. You'd have to work at it but I suppose it would be possible.

    regards

    Andrew
  • bkrieverbkriever RapidMiner Certified Analyst, MemberPosts:11Contributor II
    You could put loop attributes inside a handle exceptions operator and essentially make it fail, then recall your dataset outside of the handle exceptions operator.
    让它失败可以使用运营商一个分支end an empty data set into the example output so nothing will come back through for the loop.
    In my example my criteria was just "%{loop_attribute}"=="att5". Hope that helps!







































    <连接from_op =“记住”from_port="stored" to_port="input 2"/>






















































  • 韦塞尔韦塞尔 MemberPosts:537Guru
    Thanks for your reply!

    I was aware of this option.
    But the output from "Loop Attributes" is special.
    It doesn't create a collection of "resulting example sets".
    Instead it continuously keeps adding columns.
    In my result I really need 1 dataset to be the result, not a collection of datasets.

    edit:
    Currently playing around with the handle exception, as suggested by bkriever, I'll update later.

    Any suggestions?

    Best regards,

    Wessel
  • awchisholmawchisholm RapidMiner Certified Expert, MemberPosts:458Unicorn
    You could use Recall and Remember inside the loop and have nothing explicitly output by the loop itself. After the loop do a final Recall. This has the side effect that much less memory is used.
  • 韦塞尔韦塞尔 MemberPosts:537Guru













































    <连接from_op =“记住”from_port="stored" to_op="Loop" to_port="input 1"/>







  • 韦塞尔韦塞尔 MemberPosts:537Guru
    In my post above I managed to implement the remember and recall procedure as suggested by awchisholm.

    What I really dislike about this way of doing things, is that the recall block does not have an import port.
    So I need to be really careful not to get bugs from a incorrect execution order.

    Having said this, big thanks awchisholm.
    Never knew this could be used to remedy memory issues!

    Best regards,

    Wessel
  • awchisholmawchisholm RapidMiner Certified Expert, MemberPosts:458Unicorn
    To force the execution order, a trick is to use a "Subprocess" operator containing the "Recall" operator.

    Here's an examplehttp://rapidminernotes.blogspot.co.uk/2012/11/using-subprocess-operator-to-stop.html

    regards

    Andrew
  • 韦塞尔韦塞尔 MemberPosts:537Guru
    Awesome, thanks!:)
Sign InorRegisterto comment.