e81142f0869321cd8792e13bfc4f6fb85d9f1efc,libact/query_strategies/uncertainty_sampling.py,UncertaintySampling,make_query,#UncertaintySampling#,62

Before Change


            for j in range(len(prob)):
                m1_id = np.argmax(prob[j])
                m2_id = np.argmax(np.delete(prob[j], m1_id))
                margin = prob[j][m1_id] - prob[j][m2_id]
                if margin < min_margin:
                    min_margin = margin
                    ask_id = j

After Change


                np.max(np.abs(self.model.predict_real(X_pool)), axis=1)
            )

        elif self.method == "sm":  // smallest margin
            dvalue = self.model.predict_real(X_pool)
            if np.shape(dvalue)[1] == 2:
                ind = [0, 1]
            else:
                // Find 2 largest decision values
                ind = np.partition(-np.abs(dvalue), 2, axis=1)[:2]
            margin = np.abs(np.abs(dvalue[:, ind[0]]) - np.abs(dvalue[:, ind[1]]))
            ask_id = np.argmin(margin)

        return unlabeled_entry_ids[ask_id]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: ntucllab/libact
Commit Name: e81142f0869321cd8792e13bfc4f6fb85d9f1efc
Time: 2015-12-22
Author: yangarbiter@gmail.com
File Name: libact/query_strategies/uncertainty_sampling.py
Class Name: UncertaintySampling
Method Name: make_query


Project Name: deepdrive/deepdrive
Commit Name: b54e99fb4c6b3d513c4eecc11b27fadafef91a4a
Time: 2018-05-29
Author: cquiter@gmail.com
File Name: agents/dagger/agent.py
Class Name: Agent
Method Name: get_next_action


Project Name: biocore/scikit-bio
Commit Name: 8338270378a5c7d605b6013cd8ecd5cea6b1aa96
Time: 2015-08-05
Author: gregcaporaso@gmail.com
File Name: skbio/diversity/beta/_stats.py
Class Name:
Method Name: weighted_unifrac