Closed lizhenstat closed 3 years ago
I got it, the i{1}, i{2},... do not has the specific meaning, it just show whether the subscript is the same or not. Thanks
Term1 is added for n^2 times, since there is a sum inside each calculating. term2 and term3 is alike.
Besides, the multiply over summation is equivalent to summation over multiply.
This code is similar to that dHSIC test code in R
###
# Compute dHSIC
###
ptm <- proc.time()
term1 <- 1
term2 <- 1
term3 <- 2/len
for (j in 1:d){
term1 <- term1*K[[j]]
term2 <- 1/len^2*term2*sum(K[[j]])
term3 <- 1/len*term3*colSums(K[[j]])
}
term1 <- sum(term1)
term3 <- sum(term3)
dHSIC=1/len^2*term1+term2-term3
timeHSIC <- as.numeric((proc.time() - ptm)[1])
Hi! I'm sorry I didn't get back to you in time. In case it's still useful, the first level subscripts represent the ith vector x_i, and the second level subscripts represent the coordinate of the vector. Happy correlating!
Hi, thanks for your code on calculating HSIC on multiple groups, I have on question on Definition 2.6 in the paper
I do not understand the meaning of subscript of x, such as
Can you give me some insights about it? I know Mq(n) is the q-fold Cartesian product of the set {1,2,...,n}
the related code part is as follows
My question is that term1 is added for n 2 times, term2 is added for n (2d) times while term3 is added for n** (d+1) times However in the code, all these terms are added for 2d times, right? Can you give me some insights about it? Thanks a lot and best wishes