"[Solved] Loop function"

olioli MemberPosts:6Contributor II
edited June 2019 inHelp
Hi,

I have recently just started looking at this software and it looks really interesting. I am currently looking at the K-NN part of it.

First of all I was trying to process quite a lot of data, but have made it a lot smaller to try and get it to work, but I still have not managed it so I hope someone on here might be able to help me or point me in the right direction.

On the example I have pasted below, I bring in two names (the attribute is called NAME) where I want to predict a rating using the K-NN, it does not have any of my other data in it.

I then produce a loop, the attribute filter type is single, attribute is NAME and have used the default loop_attributes as the iteration macro.

然后循环我检索完整的数据集has lots of attributes in it, I link that to the filter and use parameter string NAME=%{loop_attributes} and then link to the K-NN, Apply Model and Performance. I am pretty sure it is ok from and including K-NN as if I put one of the NAME's instead of %{loop_attributes} it works. But if I leave it as NAME=%{loop_attributes} I get an error saying "The example has no examples".

I have tried quite a lot of things and looked at other peoples code, but I can not see what I am doing wrong, any help would be much appreciated.

Thanks,

Oli





<宏/ >




<参数键= " repository_entry" value="data/Names3"/>







<参数键= " repository_entry" value="data/data aw"/>






























Answers

  • awchisholmawchisholm RapidMiner Certified Expert, MemberPosts:458Unicorn
    Hello

    If you change the loop operator to be "Loop Values" this will iterate over all the values of the NAME attribute. The "Loop Attributes" operator is looping once for the single attribute name provided (i.e. NAME) and as a consequence no examples match leading to the error you describe.

    regards

    Andrew
  • olioli MemberPosts:6Contributor II
    Hi Andrew,

    Thank you so much for that, finally got it to work.

    Thanks,

    Oli
Sign InorRegisterto comment.