6dfa3d3e9a6a668ca6380134da7db7b63fad7f6a,tensorly/decomposition/_nn_cp.py,,non_negative_parafac_hals,#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,294

Before Change


                    hals_nnls_exact(tl.transpose(mttkrp), pseude_inverse, tl.transpose(factors[mode]),
                                     maxiter=5000)[0])
            factors_norm = tl.sum(tl.sum(pseude_inverse * tl.dot(tl.conj(tl.transpose(factors[mode])), factors[mode])))
            rec_error = norm_tensor ** 2 + factors_norm - 2 * tl.dot(tl.tensor_to_vec(factors[mode]),
                                                                     tl.tensor_to_vec(mttkrp))
            rec_error = rec_error ** (1 / 2) / norm_tensor

        if tol:
            rec_errors.append(rec_error)

After Change


        if tol:
            factors_norm = cp_norm((weights, factors))
            iprod = tl.sum(tl.sum(mttkrp*factor, axis=0)*weights)
            rec_error = tl.sqrt(tl.abs(norm_tensor**2 + factors_norm**2 - 2*iprod)) / norm_tensor
            rec_errors.append(rec_error)

            if iteration > 1:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 3

Instances


Project Name: tensorly/tensorly
Commit Name: 6dfa3d3e9a6a668ca6380134da7db7b63fad7f6a
Time: 2021-02-25
Author: caglayan.tuna@irisa.fr
File Name: tensorly/decomposition/_nn_cp.py
Class Name:
Method Name: non_negative_parafac_hals


Project Name: scipy/scipy
Commit Name: 9c47a28c86d9bc09a55789de76af23b7319c0367
Time: 2015-02-08
Author: argriffi@ncsu.edu
File Name: scipy/sparse/linalg/_norm.py
Class Name:
Method Name: norm


Project Name: Qiskit/qiskit-aqua
Commit Name: 790ff93e20cc36e15dfd039924e782cc559a67d7
Time: 2019-08-01
Author: chenrich@us.ibm.com
File Name: qiskit/aqua/operators/op_converter.py
Class Name:
Method Name: to_weighted_pauli_operator


Project Name: nipy/dipy
Commit Name: ba8bfb474b108565ac8f77544d0aeb8b1a9a0fdc
Time: 2011-02-09
Author: garyfallidis@gmail.com
File Name: dipy/reconst/dandelion.py
Class Name: SphericalDandelion
Method Name: spherical_diffusivity


Project Name: suavecode/SUAVE
Commit Name: 04f2305c1f64f99de55604dc8d068349ee4b801d
Time: 2015-05-14
Author: ebotero@stanford.edu
File Name: trunk/SUAVE/Methods/Power/Battery/Discharge/datta_discharge.py
Class Name:
Method Name: datta_discharge