83579d7761d6bc995e1e6e90cd376191e648081e,ristretto/nmf/rnmf_fhals.py,,rnmf_fhals,#,23

Before Change



            if niter == 0: fitold = fit               
            
            fitchange = abs(fitold - fit)
            fitold = fit
            
            if verbose == True:
                print("Iteration: %s fit: %s, fitchange: %s" %(niter, fit, fitchange))        

After Change


    fit = []
    
    for niter in range(maxiter):
        violation = 0.0

        // Pointer to updated factor matrix 
        if niter != 0: W = Wtemp    

        // Update factor matrix H
        WtW = W.T.dot(W)
        AtW = A.T.dot(W)
        
        violation += _rfhals_update(Ht, WtW, AtW)                        
        Ht /= sci.maximum(epsi, sci.linalg.norm(Ht, axis=0))

        // Update factor matrix W
        HHt = Ht.T.dot(Ht)
        AHt = Q.dot(A.dot(Ht)) // Rotate AHt back to high-dimensional space

        W = Q.dot(W) // Rotate W back to high-dimensional space
        violation += _rfhals_update(W, HHt, AHt)
        print(violation)
        
        // Project W to low-dimensional space
        Wtemp = Q.T.dot(W)  
        
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: erichson/ristretto
Commit Name: 83579d7761d6bc995e1e6e90cd376191e648081e
Time: 2018-03-07
Author: Benli11@users.noreply.github.com
File Name: ristretto/nmf/rnmf_fhals.py
Class Name:
Method Name: rnmf_fhals


Project Name: abhiskk/fast-neural-style
Commit Name: 851a5832065cb2988c23023b429137e1f54b5335
Time: 2017-04-03
Author: abhishekkadiyan@gmail.com
File Name: neural_style/neural_style.py
Class Name:
Method Name: train


Project Name: statsmodels/statsmodels
Commit Name: a1a0caf27341fd560101ae643bb7df1dc4dfcf46
Time: 2020-07-02
Author: kevin.k.sheppard@gmail.com
File Name: statsmodels/stats/tests/test_corrpsd.py
Class Name: Test_Factor
Method Name: test_corr_nearest_factor_sparse