6aa6d36055c11b4fb54f8dea12a6ffec01f79d70,rankeval/metrics/dcg.py,DCG,eval_per_query,#DCG#,68

Before Change


        if self.cutoff is not None:
            idx_y_pred_sorted = idx_y_pred_sorted[:self.cutoff]

        discount = np.log2(np.arange(2, len(idx_y_pred_sorted)+2))

        if self.implementation == "flat":
            gain = y[idx_y_pred_sorted]

After Change


        if self.cutoff is not None:
            idx_y_pred_sorted = idx_y_pred_sorted[:self.cutoff]

        discount = np.log2(np.arange(idx_y_pred_sorted.size) + 2)

        if self.implementation == "flat":
            gain = y[idx_y_pred_sorted]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: hpclab/rankeval
Commit Name: 6aa6d36055c11b4fb54f8dea12a6ffec01f79d70
Time: 2017-11-07
Author: trani.salvatore@gmail.com
File Name: rankeval/metrics/dcg.py
Class Name: DCG
Method Name: eval_per_query


Project Name: DistrictDataLabs/yellowbrick
Commit Name: e3419d1cfc6e94432e2f2709b9d9d377eaad872a
Time: 2018-03-18
Author: benjamin@bengfort.com
File Name: yellowbrick/classifier/classification_report.py
Class Name: ClassificationReport
Method Name: finalize


Project Name: hyperspy/hyperspy
Commit Name: 647c7910abda7a89eff45512769bca4889ff3bc9
Time: 2020-11-05
Author: nielscautaerts@hotmail.com
File Name: hyperspy/io_plugins/usid_hdf5.py
Class Name:
Method Name: _axes_list_to_dimensions