721
edits
Line 52: | Line 52: | ||
To calculate a centroid of a collection of points (our cluster) we need to do two steps: | To calculate a centroid of a collection of points (our cluster) we need to do two steps: | ||
* sum up our points: < | * sum up our points: <code lang="c++" inline>p0 + p1 + p2 + p3 ... = sum </syntaxhighlight> | ||
* divide the sum by out number of point: | * divide the sum by out number of point: | ||
<syntaxhighlight lang="python" inline> | <syntaxhighlight lang="python" inline> |