Displaying 1 result from an estimated 1 matches for "diffl".
Did you mean:
diff
2012 Oct 25
5
system is computationally singular: reciprocal condition number
...I tried the StatMatch Mahanalobis function and also this function:
mahal_dist <-function (data, nclass, nvariable) {
dist <- matrix(0, nclass, nclass)
n=0
w <- cov(data)
print(w)
for(i in 1:nclass) {
for(c in 1:nclass){
diffl <- vector(length = nvariable)
for(l in 1:nvariable){
diffl[l]=abs(data[i,l]-data[c,l])
}
### matrixes
print(diffl)
dist[i,c]= (t(diffl))%*%(solve(w))%*%(diffl)...