S_Dbw_validity_index icon indicating copy to clipboard operation
S_Dbw_validity_index copied to clipboard

ZeroDivisionError: division by zero Ask how to solve

Open wd1969 opened this issue 4 years ago • 2 comments

in S_Dbw_result(self) 74 compute the final result 75 """ ---> 76 return self.Dens_bw()+self.Scat()

in Dens_bw(self) 53 if i==j: 54 continue ---> 55 result += self.density([i,j])/max(density_list[i],density_list[j]) 56 return result/(self.k*(self.k-1)) 57

ZeroDivisionError: division by zero

wd1969 avatar Mar 08 '20 07:03 wd1969

I got the same problem

Teddylee4real avatar Dec 08 '21 13:12 Teddylee4real

a problem in the code. std_matrix_i = np.std(data[self.data_cluster == i],axis=0) should compute var instead of std.

oYoungCo avatar Dec 12 '21 06:12 oYoungCo