30d73c7518adcde7ed8340d76e306bd290e0949a,skbio/stats/composition.py,,ancom,#,643

Before Change


    cat_values = input_grouping.values
    cs = np.unique(cat_values)
    cat_dists = {k: mat[cat_values == k] for k in cs}
    cat_means = {k: np.mean(v, axis=0) for k, v in cat_dists.items()}
    cat_means = pd.DataFrame.from_dict(cat_means)
    cat_means.columns = ["Mean: %s" % e for e in cat_means.columns]
    cat_stds = {k: np.std(v, axis=0) for k, v in cat_dists.items()}
    cat_stds = pd.DataFrame.from_dict(cat_stds)
    cat_stds.columns = ["Std: %s" % e for e in cat_stds.columns]

After Change


    cat_values = input_grouping.values
    cs = np.unique(cat_values)
    cat_dists = {k: mat[cat_values == k] for k in cs}
    cat_percentiles = []
    for percentile in percentiles:
        data = {k: np.percentile(v, percentile, axis=0)
                     for k, v in cat_dists.items()}
        data = pd.DataFrame.from_dict(data)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: biocore/scikit-bio
Commit Name: 30d73c7518adcde7ed8340d76e306bd290e0949a
Time: 2016-06-07
Author: gregcaporaso@gmail.com
File Name: skbio/stats/composition.py
Class Name:
Method Name: ancom


Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: b5034279b48ae96ffdd4714f96e0f62b0f4807fc
Time: 2018-10-26
Author: jcastaldo08@gmail.com
File Name: category_encoders/ordinal.py
Class Name: OrdinalEncoder
Method Name: ordinal_encoding


Project Name: dit/dit
Commit Name: 46324d0e05c679b2cf50b81289fe2886456f6e51
Time: 2017-09-19
Author: ryangregoryjames@gmail.com
File Name: dit/pid/ibroja.py
Class Name: BROJAOptimizer
Method Name: __init__