TradingView
RicardoSantos
2020年9月7日午前10時50分
Function K-Means Clustering
OANDA:NAS100USD
5
US Nas 100
OANDA
詳細
⋅
2020年9月7日午前10時50分
Description:
A Function that returns cluster centers for given data (X,Y) vector points.
Inputs:
_X: Array containing x data points.¹
_Y: Array containing y data points.¹
_number_of_clusters: number of clusters.
Note:
¹: _X and _Y size must match.
Outputs:
_centers_x: Array containing x data points.
_centers_y: Array containing y data points.
Resources:
rosettacode.org/wiki/K-means++_clustering
en.wikipedia.org/wiki/K-means_clustering
リリースノート
⋅
2023年3月30日午前9時1分
Update to V5 and fixed a a few errors in the code. -_-*
Oscillators
experimental
function
kmeans
cluster
コメント
jon2snow
⋅
2023年3月29日午後9時36分
It is sadly not working, Message bar 0 in remove.array function, Index -1 is out of bounds, array size is 1.
RicardoSantos
⋅
2023年3月30日午前9時2分
@jon2snow
, fixed, thanks for reporting :)
luminaryfi
⋅
2020年9月12日午後3時36分
Excellent Work
@RicardoSantos
!
joaoseguradocomercial
⋅
2023年1月18日午前9時43分
nao roda
kakola
⋅
2021年3月3日午後8時37分
Instead of vectors, can k-means clustering be used on simple linear sets of data?
RicardoSantos
⋅
2021年3月3日午後10時58分
@kakola
, you can use the same set for X, Y arrays to do 1d means, but there would be better methods to achieve that..
RicardoSantos
⋅
2021年3月4日午前8時48分
@kakola
, follow up: take a look at the comments in this OS discussion:
kakola
⋅
2021年3月4日午後2時41分
@RicardoSantos
, I will try to find a clustering algorithm where N-clusters does not have to be initially provided.
RicardoSantos
⋅
2021年3月4日午後2時47分
@kakola
, sry missing link .p
stats.stackexchange.com/questions/40454/determine-different-clusters-of-1d-data-from-database
ruimnetob
⋅
2020年9月19日午後10時11分
@RicardoSantos
Olá Ricardo! Esta implementação de clustering por K-Means está funcional? Obrigado!
詳細