search for: index_row

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

Did you mean: index_low
2013 Apr 24
0
Help me make faster R code for Kennard-Stone algorithm [My code is so slow from Matlab]
...ix # D[i, j] = Euclidean distance between object i and j (j > i) D[i, j] = max(svd(xa - xb)$d) # the largest singular value } } cat("for (i in 1:(M - 1)) done! \n") maxD = apply(D, 2, max) index_row = apply(D, 2, function(x) which(x == max(x))[1]) dummy = max(maxD) index_column = which(maxD == dummy) m = vector() m[1] = index_row[index_column] m[2] = index_column dminmax[2] = D[m[1], m[2]] for (i in 3:N) { pool = setdif...