30eadc321c1755eca615a39bb4b8b5fc1e769f70,dipy/reconst/mdki.py,,_wls_fit_mdki,#,288

Before Change


    W = np.diag(ng * msignal ** 2)

    // WLS solution
    BTW = np.dot(design_matrix.T, W)
    inv_BT_W_B = np.linalg.pinv(np.dot(BTW, design_matrix))
    invBTWB_BTW = np.dot(inv_BT_W_B, BTW)
    params = np.dot(invBTWB_BTW, np.log(msignal))

After Change


    w = ng * msignal ** 2

    // BTW = (Bw).T, where w are diag of W
    BTW = (w[..., None] * design_matrix).T
    inv_BT_W_B = np.linalg.pinv(np.einsum("...ij,jk->...ik", BTW,
                                          design_matrix))  // dot product
    invBTWB_BTW = np.einsum("...ij,...jk->...ik", inv_BT_W_B, BTW)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: nipy/dipy
Commit Name: 30eadc321c1755eca615a39bb4b8b5fc1e769f70
Time: 2019-03-10
Author: rafaelnh21@gmail.com
File Name: dipy/reconst/mdki.py
Class Name:
Method Name: _wls_fit_mdki


Project Name: hmmlearn/hmmlearn
Commit Name: db2d06991c37812b38330b32588c12c55fe021fd
Time: 2019-11-20
Author: anntzer.lee@gmail.com
File Name: lib/hmmlearn/stats.py
Class Name:
Method Name: _log_multivariate_normal_density_diag


Project Name: data61/python-paillier
Commit Name: eb4ffb6cdaf6f04f978fc57e32c95c8b4a33bcb6
Time: 2017-06-20
Author: giorgio.patrini@anu.edu.au
File Name: examples/federated_learning_with_encryption.py
Class Name: Client
Method Name: fit