wq2012 / SpectralCluster

Python re-implementation of the (constrained) spectral clustering algorithms used in Google's speaker diarization papers.
https://google.github.io/speaker-id/publications/LstmDiarization/
Apache License 2.0
513 stars 73 forks source link

Autotune proxy condition in spectral_cluster.py #51

Closed Kaczmarekrr closed 1 year ago

Kaczmarekrr commented 1 year ago

Hi! I have a question about conditions for autotune.Proxy which makes no sense for me. Is this the intended use? There is the same condition for both if and elif statement in computation of percentile to ratio. As I understand there is two options for autotuner that one comes with sqrt and one does not.

At the line 281:

        if self.autotune.proxy == AutoTuneProxy.PercentileSqrtOverNME:
          ratio = np.sqrt(1 - p_percentile) / max_delta_norm
        elif self.autotune.proxy == AutoTuneProxy.PercentileSqrtOverNME:
          ratio = (1 - p_percentile) / max_delta_norm
        else:
          raise ValueError("Unsupported value of AutoTuneProxy")
        return ratio, eigenvectors, n_clusters
wq2012 commented 1 year ago

It's a typo. Just fixed. Thanks.