Open CLNET-pixel opened 4 years ago
I encountered the same issue. It should be "num_anom = len(np.where(error > util.threhold)[0])" like you said or "num_anom = (np.sum(error > util.threhold))" to count the points where we have reconstruction error larger than the threshold.
I suppose your code forget to add [0] into the np.where. "num_anom = len(np.where(error > util.threhold)) " ,this will lead to all valid_anomaly_score being 2. Maybe you should modify it with num_anom = len(np.where(error > util.threhold)[0])