Automatically optimize parameters


Is there anyway to setup a process to automatically find the best parameters for let’s say kNN? I know there are loop variables but I am not sure how to set them up to test out various k values for kNN and to determine the best value of k.


You can use e.g. the Counting Loop start and set up a loop that runs from 1 to 10. Inside the loop, you put the kNN node and pin “k” to the current loop iteration value in the dialog’s “Flow Variables” tab. Then you do the prediction and scoring and collect everything in the generic loop end node.
You might need to enable the expert mode to get access to all necessary loop nodes (pass -D as Java argument while starting KNIME).

Thank you for the very prompt reply. So this is how you use the “Flow Variables” tab. I could not figure it out how it is to be used until now.

Does KNIME support a GA search? If so I reccomend it … and if NOT I recommend it be implemented.
Dr.vK - Knimegut

No, we do not have any automatic optimization loops, be it genetic or not. Only the Feature Selection meta node does some kind of automated search.