search for: ksfun

Displaying 1 result from an estimated 1 matches for "ksfun".

Did you mean: sfun
2013 Apr 24
0
Help me make faster R code for Kennard-Stone algorithm [My code is so slow from Matlab]
...it is too slow. I hope that you can help to improve the performance. Thanks. kevin ################################################################################ # ############################################################################## # Kennard-Stone algorithm for selection of samples ksFun = function(x, N) { # Initial the vector of minimum distance dminmax = sample(0, N, replace = TRUE) # Default: FALSE M = nrow(x) samples = 1:M # Initializes the matrix of distances D = matrix(0, nrow = M, ncol = M) for (i in 1:(M - 1)) {...