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


    // 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(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

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: dirty-cat/dirty_cat
Commit Name: f70e71d5c7fdc8e25391e54e74c3402fb323ad5c
Time: 2018-06-06
Author: pierreglaser@msn.com
File Name: examples/plot_employee_salaries.py
Class Name:
Method Name:


Project Name: Kamnitsask/deepmedic
Commit Name: b3577d4e9b141ea2a65ef977a3e9be31aa9dbb58
Time: 2020-01-20
Author: konstantinos.kamnitsas12@imperial.ac.uk
File Name: deepmedic/neuralnet/cnn3d.py
Class Name: Cnn3d
Method Name: apply