1456d22014c7c32e26c799bd1864217dca589892,pyroomacoustics/recognition.py,HMM,fit,#HMM#Any#Any#Any#Any#,224

Before Change


        """

        // Initialize all parameters
        if init_func is None:
            self.emission = self.emission_class(self.K, examples=examples) 
            self.initialize(examples[0].shape[1])
        else:
            self.pi = np.zeros((self.K))
            self.A = np.zeros((self.K, self.K))
            self.emission = self.emission_class(self.K, odim=examples[0].shape[1])
            init_func(self.A, self.pi, self.emission, examples)

        // Run the EM algorithm
        loglikelihood_old = -np.inf // log-likelihood
        n_iter = 0
        while True:

After Change


            //--------------------------
            n_iter += 1
            epsilon = loglikelihood - loglikelihood_old
            if verbose:
                print("Iterations:", n_iter, "epsilon:", epsilon, "LL_new:", loglikelihood)

            // some checks here
            if epsilon < tol:
                if verbose:
                    print("Tolerance reached: stopping.")
                break
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: LCAV/pyroomacoustics
Commit Name: 1456d22014c7c32e26c799bd1864217dca589892
Time: 2016-06-20
Author: fakufaku@gmail.com
File Name: pyroomacoustics/recognition.py
Class Name: HMM
Method Name: fit


Project Name: dmlc/gluon-cv
Commit Name: 2318052dc79966bf36675606b7d992a347418292
Time: 2019-01-07
Author: cheungchih@gmail.com
File Name: scripts/detection/ssd/train_ssd.py
Class Name:
Method Name:


Project Name: mozilla/TTS
Commit Name: a7aefd5c509e6862f8dfbf751ddc3a876e7550b9
Time: 2020-11-12
Author: erogol@hotmail.com
File Name: TTS/bin/train_tacotron.py
Class Name:
Method Name: main