3e34b1c15caa9dadad7654bed42b8c967f9379d1,dipy/reconst/ivim.py,IvimModel,estimate_x0,#IvimModel#Any#,207

Before Change


        // We set the S0 guess as the signal value at b=0
        // The D* guess is roughly 10 times the D value
        D_star_guess = 10 * D_guess
        return np.array([data[0], f_guess, D_star_guess, D_guess])

    def _estimate_S0_D(self, data):
        
        Obtain initial guess for S0 and D for two stage fitting.

After Change


        f_guess = 1 - S0_hat / data[0]
        // We set the S0 guess as the signal value at b=0
        // The D* guess is roughly 10 times the D value
        x0 = np.array([data[0], f_guess, 10 * D_guess, D_guess])

        if self.bounds is None:
            bounds_check = [np.inf, 1., 0.1, 0.1]
        else:
            bounds_check = self.bounds

        x0 = np.where(x0 > bounds_check[0], x0, bounds_check[0])
        x0 = np.where(x0 < bounds_check[1], x0, bounds_check[1])

        return x0

    def _estimate_S0_D(self, data):
        
        Obtain initial guess for S0 and D for two stage fitting.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: nipy/dipy
Commit Name: 3e34b1c15caa9dadad7654bed42b8c967f9379d1
Time: 2016-07-28
Author: shahnawaz.ahmed95@gmail.com
File Name: dipy/reconst/ivim.py
Class Name: IvimModel
Method Name: estimate_x0


Project Name: Unity-Technologies/ml-agents
Commit Name: d63a9d7c0564d20667ab6d7ebf2be7a012f194b2
Time: 2021-03-11
Author: 54679309+andrewcoh@users.noreply.github.com
File Name: ml-agents/mlagents/trainers/torch/components/reward_providers/extrinsic_reward_provider.py
Class Name: ExtrinsicRewardProvider
Method Name: evaluate


Project Name: biolab/orange3
Commit Name: ee27c11166d39aafb9bf6196a037346c73ed2ae6
Time: 2015-02-20
Author: janez.demsar@fri.uni-lj.si
File Name: Orange/preprocess/transformation.py
Class Name: Transformation
Method Name: __call__