f06136b7fabbe2f96410962cb48172dbf661d2ab,pb_bss/distribution/cbmm.py,CBMM,_predict,#CBMM#,38

Before Change


        
        log_pdf = self.complex_bingham.log_pdf(y[..., None, :, :])

        affiliation = np.log(self.weight) + log_pdf
        affiliation -= np.max(affiliation, axis=-2, keepdims=True)
        np.exp(affiliation, out=affiliation)
        denominator = np.maximum(
            np.einsum("...kn->...n", affiliation)[..., None, :],
            np.finfo(affiliation.dtype).tiny,
        )
        affiliation /= denominator

        if affiliation_eps != 0:
            affiliation = np.clip(
                affiliation, affiliation_eps, 1 - affiliation_eps
            )

        return affiliation

After Change


            affiliation_eps:
        Returns: Affiliations with shape (..., K, T).
        
        affiliation = log_pdf_to_affiliation(
                self.weight,
                self.complex_bingham.log_pdf(y[..., None, :, :]),
                source_activity_mask=None,
                affiliation_eps=affiliation_eps,
        )

        return affiliation

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 16

Instances


Project Name: fgnt/pb_bss
Commit Name: f06136b7fabbe2f96410962cb48172dbf661d2ab
Time: 2019-08-09
Author: mail@lukas-drude.de
File Name: pb_bss/distribution/cbmm.py
Class Name: CBMM
Method Name: _predict


Project Name: fgnt/pb_bss
Commit Name: f06136b7fabbe2f96410962cb48172dbf661d2ab
Time: 2019-08-09
Author: mail@lukas-drude.de
File Name: pb_bss/distribution/cbmm.py
Class Name: CBMM
Method Name: _predict


Project Name: fgnt/pb_bss
Commit Name: 237e4335ca2927526e00e81456543da624e2ba31
Time: 2019-08-08
Author: mail@lukas-drude.de
File Name: pb_bss/distribution/gcacgmm.py
Class Name: GCACGMM
Method Name: _predict


Project Name: fgnt/pb_bss
Commit Name: 237e4335ca2927526e00e81456543da624e2ba31
Time: 2019-08-08
Author: mail@lukas-drude.de
File Name: pb_bss/distribution/vmfcacgmm.py
Class Name: VMFCACGMM
Method Name: _predict