5601c4bb909b4146327fa68c6d5b668f997baaff,pyinterpret/data/dataset.py,DataSet,_build_metastore,#DataSet#Any#,125

Before Change


        // the percentile distance of each datapoint to the global median
        // dist_percentiles = map(lambda i: int(stats.percentileofscore(dists, i)), dists)

        ranks = pd.Series(dists).rank().values
        round_to = n_rows / float(bin_count)
        rounder_func = lambda x: int(round_to * round(float(x) / round_to))
        ranks_rounded = map(rounder_func, ranks)
        ranks_rounded = np.array([round(x, 2) for x in ranks / ranks.max()])
        return {
            "median": medians,
            "dists": dists,
            "n_rows": n_rows,

After Change


            ranks_rounded = pd.qcut(dists, bins / 100, labels=False)
            unique_ranks = np.unique(ranks_rounded)
        else:
            ranks_rounded = np.ones(n_rows)
            unique_ranks = np.ones(1)
        return {
            "median": medians,
            "dists": dists,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: datascienceinc/Skater
Commit Name: 5601c4bb909b4146327fa68c6d5b668f997baaff
Time: 2017-03-21
Author: aikramer2@gmail.com
File Name: pyinterpret/data/dataset.py
Class Name: DataSet
Method Name: _build_metastore


Project Name: EpistasisLab/scikit-rebate
Commit Name: ece383696800b9b34854df27a65a3d1d74669952
Time: 2020-05-28
Author: alexmxu@alexs-mbp-3.attlocal.net
File Name: skrebate/iterrelief.py
Class Name: IterRelief
Method Name: fit


Project Name: EpistasisLab/scikit-rebate
Commit Name: 163eb7df13667e21b0e02a2706e18d1f53eee610
Time: 2020-01-29
Author: alexmxu99@gmail.com
File Name: skrebate/iterrelief.py
Class Name: IterRelief
Method Name: fit