Duke02 / Clustering

Trying out clustering algorithms
0 stars 0 forks source link

Uncertainty Plot Wrong #1

Open Duke02 opened 5 years ago

Duke02 commented 5 years ago

How the program currently works is that there are 0's in the clustered data. The uncertainty function takes in that clustered data, even though the uncertainty will be skewed due to the 0's. Maybe what needs to be fixed is you do something like

for data in clustered_data[:,~np.all(clustered_data, axis=3)]:
     # calculate the covariance of data

when taking the covariance of all the data.

Duke02 commented 5 years ago

Another way that could fix this is through masked arrays -

clustered_data = np.ma.masked_equal(clustered_data, 0.0)
for data in clustered_data:
    # ...

(Reference)