src/mf_algorithms/mf.py
def leftals(self, X, lf, rf, row, **kwargs):
    
        '''
        Least squares update step 
        
        Parameters:
        ---------------
        X:      array
                The data matrix "X" to be factored
        lf:     array
                The left factor matrix to be updated
        rf:     array
                The right factor matrix used in the update
        row:    int 
                The row of the data matrix "X" used in the update
        '''
    
        siter = kwargs.get('siter', 1)
        for i in np.arange(siter):
            lf[row, :] = np.linalg.lstsq(rf.T, X[row, :].T, rcond = None)[0].T
        
        return lf

        Least squares update step 
        
        Parameters:
        ---------------
        X:      array
                The data matrix "X" to be factored
        lf:     array
                The left factor matrix to be updated
        rf:     array
                The right factor matrix used in the update
        row:    int 
                The row of the data matrix "X" used in the update
        
Least squares update step
Parameters.

array
The data matrix "X" to be factored
lf:     array
The left factor matrix to be updated
rf:     array
The right factor matrix used in the update
row:    int
The row of the data matrix "X" used in the update
Least squares update step Parameters . array The data matrix " X " to be factored lf : array The left factor matrix to be updated rf : array The right factor matrix used in the update row : int The row of the data matrix " X " used in the update
def leftals(self, X, lf, rf, row, **kwargs):
        siter = kwargs.get('siter', 1)
        for i in np.arange(siter):
            lf[row, :] = np.linalg.lstsq(rf.T, X[row, :].T, rcond = None)[0].T
        return lf
def leftals ( self , X , lf , rf , row , ** kwargs ) : siter = kwargs . get ( 'siter' , 1 ) for i in np . arange ( siter ) : lf [ row , : ] = np . linalg . lstsq ( rf . T , X [ row , : ] . T , rcond = None ) [ 0 ] . T return lf
Least squares update step
Parameters:
Least squares update step Parameters :
'''
        Least squares update step 
        
        Parameters:
        ---------------
        X:      array
                The data matrix "X" to be factored
        lf:     array
                The left factor matrix to be updated
        rf:     array
                The right factor matrix used in the update
        row:    int 
                The row of the data matrix "X" used in the update
        '''
self
X
lf
rf
row