A Function that returns cluster centers for given data (X,Y) vector points.
_X: Array containing x data points.¹
_Y: Array containing y data points.¹
_number_of_clusters: number of clusters.
¹: _X and _Y size must match.
_centers_x: Array containing x data points.
_centers_y: Array containing y data points.
My intent is to use k-means clustering in Pine Script the same way as the above article does, however, I am only familiar with python and sklearn and feel like I would need to see a working pine script example first. If you do decide to make the above before me then I applaud you!
But wasn't possible, so built quickly using python. @ricardoSantos from what I see, you already have a code generating centers tho, so why can't he use that to draw the centers?