def test_compute_averaged_metrics():
    ' Tests compute_averaged_metrics function'
    y_truth = [0, 1, 2, 0, 1, 2]
    scores1 = [[0.7, 0.2, 0.1], [0.1, 0.7, 0.2], [0.2, 0.1, 0.7], [0.8, 0.1, 0.1], [0.1, 0.8, 0.1], [0.1, 0.1, 0.8]]
    result1 = compute_averaged_metrics(y_truth, scores1, roc_auc_function)
    nose.tools.assert_almost_equal(1.0, result1, delta=1e-06)
    scores2 = [[0.1, 0.1, 0.8], [0.7, 0.2, 0.1], [0.1, 0.7, 0.2], [0.2, 0.1, 0.7], [0.8, 0.1, 0.1], [0.1, 0.8, 0.1]]
    result2 = compute_averaged_metrics(y_truth, scores2, roc_auc_function)
    nose.tools.assert_almost_equal(0.375, result2, delta=1e-06)
Tests compute_averaged_metrics function
def test_compute_averaged_metrics():
    ' '
    y_truth = [0, 1, 2, 0, 1, 2]
    scores1 = [[0.7, 0.2, 0.1], [0.1, 0.7, 0.2], [0.2, 0.1, 0.7], [0.8, 0.1, 0.1], [0.1, 0.8, 0.1], [0.1, 0.1, 0.8]]
    result1 = compute_averaged_metrics(y_truth, scores1, roc_auc_function)
    nose.tools.assert_almost_equal(1.0, result1, delta=1e-06)
    scores2 = [[0.1, 0.1, 0.8], [0.7, 0.2, 0.1], [0.1, 0.7, 0.2], [0.2, 0.1, 0.7], [0.8, 0.1, 0.1], [0.1, 0.8, 0.1]]
    result2 = compute_averaged_metrics(y_truth, scores2, roc_auc_function)
    nose.tools.assert_almost_equal(0.375, result2, delta=1e-06)