Loop values

minesmines Member Posts: 12 Learner I
Hello! I need to make a prediction with svm algorithm and i need to use the loop values to make a prediction the number of cases for the next ten days. I see some tutorials but i dont understand how to use the loop values for my case. Someone can help me? 
Best regards.


  • Options
    kaymankayman Member Posts: 662 Unicorn
    While using the loop values operator you first define which values (from a given attribute) you want to loop. So assume you have an attribute called 'my_attribute' that contains the values you want to loop you add 'my_attribute' as attribute.

    The loop values operator will iterate through all of the values and each unique value (your keys) will be stored by default in the loop_value macro, but you can name this whatever you want in the loop values operator settings. This sounds more complex than needed, just know that the operator kind of groups all of the values, and will then loop through each of this values, temporarily storing the value in the mentioned macro.

    Inside the loop values operator you now need to put a filter examples operator, and you will filter on 'my_attribute', using the macro value (%{loop_value}). This will give you exactly what you need, a subset of the full list, but only with values equal on the current macro value.

    With this filtered set you can then do whatever you want inside of the loop operator, and choose to just add everything together again or whatever makes sense.
  • Options
    minesmines Member Posts: 12 Learner I
    Hello @kayman. Thank you for your help. But i have another doubt related to train and test model. So i build a model with svr and i train so in the test model do I use the loop to make the correct prediction?
    Best regards
Sign In or Register to comment.