ee5e9a5a7320bac1b2ed27957e3a7087fdddbcad,dipy/core/stat/resampling.py,,jackknife,#Any#Any#Any#,207

Before Change


    N = len(pdf)
    pdf_mask = np.ones((N,),dtype="int16")
    if M == None:
        M = np.round(0.10 * len(pdf))
    jk_pdf = np.empty((M,))
    
    for ii in range(0, M):
        rand_index = np.round(np.random.random() * (N - 1))
        //choose a unique random sample to remove
        while pdf_mask[rand_index] == 0 :
            rand_index = np.round(np.random.random() * (N - 1))
        //set mask to zero for chosen random index
        pdf_mask[rand_index] = 0
        jk_pdf[ii] = statistic(pdf[pdf_mask > 0]) 
    
    return jk_pdf, np.mean(jk_pdf) - statistic(pdf), M/(M-1)*np.std(jk_pdf)

def residual_bootstrap(data):
    pass

After Change


    mask_index = np.copy(pdf_mask)
    if M == None:
        M = N
    M = np.minimum(M, N - 1)
    jk_pdf = np.empty((M,))
    
    for ii in range(0, M):
        rand_index = np.round(np.random.random() * (N - 1))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: nipy/dipy
Commit Name: ee5e9a5a7320bac1b2ed27957e3a7087fdddbcad
Time: 2010-07-26
Author: christopher.t.nguyen@gmail.com
File Name: dipy/core/stat/resampling.py
Class Name:
Method Name: jackknife


Project Name: CellProfiler/CellProfiler
Commit Name: 475722f1825d7c54fd27fb42723874ecc30b8f5d
Time: 2011-02-02
Author: leek@1fc53939-2000-0410-845c-e8453a809027
File Name: cellprofiler/modules/reassignobjectnumbers.py
Class Name:
Method Name: copy_labels


Project Name: NifTK/NiftyNet
Commit Name: 7c8af7a941f49539f2d5eb1b17d61952fc70e2bc
Time: 2017-10-24
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/layer/resampler.py
Class Name: ResamplerLayer
Method Name: _resample_inv_dst_weighting