e79449afe45f4da6f1756a7d92bdd3cd6618c638,qanta/buzzer/util.py,,process_question,#Any#Any#Any#,86
Before Change
q_group = sorted(q_group.items(), key=lambda x: x[0])
word_positions, guesses = list(map(list, zip(*q_group)))
// each entry is a list of (guess, logit, prob) sorted by logit
labels = np.array([int(g[0][0] == answer) for g in guesses], dtype=np.int32)
vectors = vector_converter(guesses)
return qid, vectors, labels, word_positions
After Change
// each entry is a list of (guess, logit, prob) sorted by logit
// labels = np.array([int(g[0][0] == answer) for g in guesses], dtype=np.int32)
// vectors = vector_converter(guesses)
q_rows = q_rows.groupby("char_index")
q_rows = q_rows.apply(lambda x: x.sort_values("score"))
return qid, vectors, labels, word_positions
def read_data(
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances Project Name: Pinafore/qb
Commit Name: e79449afe45f4da6f1756a7d92bdd3cd6618c638
Time: 2018-04-25
Author: sjtufs@gmail.com
File Name: qanta/buzzer/util.py
Class Name:
Method Name: process_question
Project Name: scipy/scipy
Commit Name: b127d30a0a0a3d3d7ad94dd629d2e673b6477cc8
Time: 2016-02-16
Author: tyler.je.reddy@gmail.com
File Name: scipy/spatial/_spherical_voronoi.py
Class Name: SphericalVoronoi
Method Name: _calc_vertices_regions
Project Name: daavoo/pyntcloud
Commit Name: b6106d3044f7800af8710cbdc998ed78f7e6588c
Time: 2016-11-30
Author: daviddelaiglesiacastro@gmail.com
File Name: pyntcloud/structures/octree.py
Class Name: Octree
Method Name: get_level_as_sf