def rlf(self, lvl, theta=None):
        
        if theta is None:
            # Use built-in autocorrelation parameters
            theta = self.theta[lvl]
            
        # Initialize output
        rlf_value = 1e20 
        
        # Retrieve data
        n_samples = self.n_samples[lvl]
        y = self.y[lvl]
        F = self.F[lvl]
        p = self.p[lvl]
        q = self.q[lvl]

        R = self._build_R(lvl, theta)
        
        try:
            C = linalg.cholesky(R, lower=True)
        except linalg.LinAlgError:
            _logger.warning(('Cholesky decomposition of R at level %i failed' % lvl) +
                             ' with theta='+str(theta))
            return rlf_value
               
        # Get generalized least squares solution
        Ft = solve_triangular(C, F, lower=True)
        Yt = solve_triangular(C, y, lower=True)
        try:
            Q, G = linalg.qr(Ft, econ=True)
        except:
            # DeprecationWarning: qr econ argument will be removed after scipy
            # 0.7. The economy transform will then be available through the
            # mode='economic' argument.
            Q, G = linalg.qr(Ft, mode='economic')
            pass

        # Universal Kriging
        beta = solve_triangular(G, np.dot(Q.T, Yt))
            
        err = Yt - np.dot(Ft,beta)
        err2 = np.dot(err.T, err)[0,0]
        self._err = err
        sigma2 = err2 /(n_samples - p - q)
        detR = ((np.diag(C))**(2./n_samples)).prod()
                           
        rlf_value = (n_samples - p - q)*np.log10(sigma2) \
                    + n_samples*np.log10(detR)     

        self.beta_rho[lvl] = beta[:q]
        self.beta_regr[lvl] = beta[q:]
        self.beta[lvl] = beta
        self.sigma2[lvl] = sigma2
        self.C[lvl] = C
        self.G[lvl] = G
                
        return rlf_value
This function determines the BLUP parameters and evaluates the negative reduced
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.lib/src/openmdao/lib/surrogatemodels/multifi_cokriging_surrogate.py/MultiFiCoKriging.rlf