mhahsler/streamMOA

question about centers

Opened this issue · 2 comments

Hi! I want to get the value of the distance between the points to the closest center(before create a new center).

this is the part of my code:

stream <- DSD_ReadCSV(file = "mds40_ay4_ba1.csv", header = TRUE)
data <- read.csv("mds40_ay4_ba1.csv", header = TRUE)
data <- data.matrix(data)
reset_stream(stream)
ct <- DSC_ClusTree(horizon = 180, maxHeight = 8, lambda = NULL, k = NULL)
maxDimension <- 1
eps <- 0.029

layout(matrix(c(1,2,2,3,4,4), nrow = 2, ncol = 3, byrow = TRUE))
Diag1<-0
wasserp2d01 <- numeric(9)
streamProgress <- integer(9)
newvalue<-0
for (i in 1:16) {
update(ct, stream, 400)
centers <- data.matrix(na.omit(get_centers(ct, type = "micro")))

And it only gives me the value of all the centers. Could you give me some advice to change it? Thanks so much!

I am not quite sure I understand your question. Data stream clustering algorithms only keep centers and not the points. You would need to calculate the distance yourself using dist() in package proxy.