e79449afe45f4da6f1756a7d92bdd3cd6618c638,qanta/buzzer/util.py,,process_question,#,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: 4
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: nilmtk/nilmtk
Commit Name: 5b3825182525ee6a22f4d0d7fd5f66c9245fef4c
Time: 2014-12-19
Author: jack-list@xlk.org.uk
File Name: nilmtk/stats/goodsectionsresults.py
Class Name: GoodSectionsResults
Method Name: import_from_cache
Project Name: has2k1/plotnine
Commit Name: 666b01f0a3c060be93b804b27814af58e1e50aac
Time: 2020-03-21
Author: has2k1@gmail.com
File Name: plotnine/aes.py
Class Name:
Method Name: reorder