7da447b4b42c4b214fc464deb3a3166a9bace7b2,scanpy/preprocessing/simple.py,,filter_genes_dispersion,#Any#Any#Any#Any#Any#Any#Any#Any#Any#,110

Before Change


    sett.m(0, "... filter highly varying genes by dispersion and mean")
    X = data  // proceed with data matrix
    from sklearn.preprocessing import StandardScaler
    scaler = StandardScaler(with_mean=False).partial_fit(X)
    mean = scaler.mean_
    var = scaler.var_ * (X.shape[0]/(X.shape[0]-1))  // use R convention (unbiased estimator)
    dispersion = var / (mean + 1e-12)
    if log:  // logarithmized mean as in Seurat
        dispersion[dispersion == 0] = np.nan

After Change


        return adata if copy else None
    logg.m("... filter highly varying genes by dispersion and mean", r=True, end=" ")
    X = data  // proceed with data matrix
    mean, var = _get_mean_var(X)
    // now actually compute the dispersion
    dispersion = var / mean
    if log:  // logarithmized mean as in Seurat
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: theislab/scanpy
Commit Name: 7da447b4b42c4b214fc464deb3a3166a9bace7b2
Time: 2017-05-22
Author: f.alex.wolf@gmx.de
File Name: scanpy/preprocessing/simple.py
Class Name:
Method Name: filter_genes_dispersion


Project Name: automl/auto-sklearn
Commit Name: 0056575ee679087e47b6c8eb06be2ad6a8ffd3ed
Time: 2017-05-02
Author: feurerm@informatik.uni-freiburg.de
File Name: autosklearn/pipeline/components/regression/gaussian_process.py
Class Name: GaussianProcess
Method Name: fit


Project Name: glm-tools/pyglmnet
Commit Name: 0ce5a2bed019cd81f88a1c9c4b5eaeff971383e7
Time: 2018-08-27
Author: mainakjas@gmail.com
File Name: tests/test_pyglmnet.py
Class Name:
Method Name: test_glmnet