Icon

kn_​example_​loop_​over_​nearest_​neighbor

Iterates list of parameters and uses them to parameterize a k-means algorithm.

The flow reads a data set to be clustered (Iris data). The data file is contained in the workflow directory. The loop will use one parameter at a time, run the (parameterized) k-means algorithm, assess the clustering quality and record the values.

Iteration over K to determine a different number of clusters this workflow clusters the data with different numbers of clusters. Inside the meta node different k are evaluated for k means and their entropy scorer can be achieved at the outport of the meta node.https://www.knime.com/nodeguide/control-structures/loops/loop-over-a-set-of-parameter-for-k-means https://forum.knime.com/t/iteration-over-k-values-using-variables-in-the-k-nearest-neighbor-node/13070 k (2-8)Assess QualityExtract Qualityclass Target variableQuality descendingEntropy descendingiris.tableIris DataOne row at a timeAppend ParameterAggregateassign clustercalculatek_meanstop rowoptimal kTable Creator Entropy Scorer Row Filter K Nearest Neighbor Partitioning Sorter Table Reader Table Row ToVariable Loop Start Variable toTable Column Loop End Cluster Assigner k-Means Row Filter Table Rowto Variable Iteration over K to determine a different number of clusters this workflow clusters the data with different numbers of clusters. Inside the meta node different k are evaluated for k means and their entropy scorer can be achieved at the outport of the meta node.https://www.knime.com/nodeguide/control-structures/loops/loop-over-a-set-of-parameter-for-k-means https://forum.knime.com/t/iteration-over-k-values-using-variables-in-the-k-nearest-neighbor-node/13070 k (2-8)Assess QualityExtract Qualityclass Target variableQuality descendingEntropy descendingiris.tableIris DataOne row at a timeAppend ParameterAggregateassign clustercalculatek_meanstop rowoptimal kTable Creator Entropy Scorer Row Filter K Nearest Neighbor Partitioning Sorter Table Reader Table Row ToVariable Loop Start Variable toTable Column Loop End Cluster Assigner k-Means Row Filter Table Rowto Variable

Nodes

Extensions

Links