c54f3fde1c5210e090a0cd9ca95d36bdec5def8d,dipy/reconst/fwdti.py,,_wls_iter,#Any#Any#Any#Any#Any#Any#Any#,303
Before Change
df = df * 0.1
fs = np.linspace(flow+df, fhig-df, num=ns) // sampling f
// repeat fw contribution for all the samples
SFW = np.matlib.repmat(fwsig, 1, ns)
FS, SI = np.meshgrid(fs, sig)
for p in range(piterations):
// Free-water adjusted signal
y = np.log((SI - FS*params[6]*SFW) / (1 - FS))
// Estimate tissue"s tensor from inv(A.T*S2*A)*A.T*S2*y
S2 = np.diag(np.square(np.dot(W, params)))
WS2 = np.dot(W.T, S2)
invWS2W = np.linalg.pinv(np.dot(WS2, W))
all_new_params = np.dot(np.dot(invWS2W, WS2), y)
// compute F2
S0r = np.matlib.repmat(all_new_params[:, 6], nvol, 1)
SIpred = (1-FS)*np.exp(np.dot(W, all_new_params)) + FS*S0r*SFW
F2 = np.sum(np.square(SI - SIpred))
// Select params for lower F2
After Change
all_new_params = np.dot(np.dot(invWS2W, WS2), y)
// compute F2
S0r = np.exp(-np.array([all_new_params[6],]*nvol))
SIpred = (1-FS)*np.exp(np.dot(W, all_new_params)) + FS*S0r*SFW.T
F2 = np.sum(np.square(SI - SIpred), axis=0)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: nipy/dipy
Commit Name: c54f3fde1c5210e090a0cd9ca95d36bdec5def8d
Time: 2016-08-29
Author: rafaelnh21@gmail.com
File Name: dipy/reconst/fwdti.py
Class Name:
Method Name: _wls_iter
Project Name: scikit-learn-contrib/DESlib
Commit Name: 0e17f47e9a4920e276bb61b60d6de16264bc6bcf
Time: 2017-12-29
Author: rafaelmenelau@gmail.com
File Name: pythonds/util/prob_functions.py
Class Name:
Method Name: ccprmod
Project Name: nipy/dipy
Commit Name: e3c2740c3f3e2451dd1dfed82a1cdbba63139ba4
Time: 2016-08-29
Author: rafaelnh21@gmail.com
File Name: dipy/reconst/fwdti.py
Class Name:
Method Name: _wls_iter