aa7322f6057dce6424af3f2245e4c45bd33af05e,scripts/speaker_embedding.py,,speaker_recognition_xp,#Any#Any#Any#Any#Any#,278

Before Change


    y_pred = []
    key_mapping = {0: None, -1: 0, 1: 1}
    for i, _ in enumerate(keys.index):
        for j, _ in enumerate(keys):
            y = key_mapping[keys.iloc[i, j]]
            if y is None:
                continue

            y_true.append(y)
            y_pred.append(D[i, j])

    y_true = np.array(y_true)
    y_pred = np.array(y_pred)

    return det_curve(y_true, y_pred, distances=True)

After Change


    n_positive = positive.shape[0]
    n_negative = negative.shape[0]
    // n_untested = untested.shape[0]
    y_true = np.hstack([np.ones(n_positive,), np.zeros(n_negative)])

    return det_curve(y_true, y_pred, distances=True)

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: pyannote/pyannote-audio
Commit Name: aa7322f6057dce6424af3f2245e4c45bd33af05e
Time: 2017-01-11
Author: bredin@limsi.fr
File Name: scripts/speaker_embedding.py
Class Name:
Method Name: speaker_recognition_xp


Project Name: cmu-db/ottertune
Commit Name: 21971e673fabe25d3e7da6712f80222760516113
Time: 2020-02-26
Author: bohanzhang95@gmail.com
File Name: server/website/website/tasks/async_tasks.py
Class Name:
Method Name: clean_metric_data


Project Name: PyMVPA/PyMVPA
Commit Name: 0dff96e2921e94c97bf8c2314b84cf23b44048f6
Time: 2015-03-24
Author: superstar@medusa.ovgu.de
File Name: mvpa2/tests/test_stelzer_clusterthr.py
Class Name:
Method Name: test_cluster_count