def getScores(pred, real, thresholds=[1, 1, 1]):
    """

    Returns evaluation metrics to evaluate one cross-validation:
    For each class, Sensitivity and Specificity. Order:
    sen_dd, sen_co, sen_td, spe_dd, spe_co, spe_td

    pred: Predicted probabilities. For each sample, vector is such as
    [pred_dd, pred_co, pred_td]
    real: real label. A label is a 3-long boolean vector.
    DD: [1, 0, 0] - CO: [0, 1, 0] - TD: [0, 0, 1]
    thresholds: weightings to compensate lack of data in certain class.
    """

    if len(pred) != len(real):
        raise Exception("ERROR: input vectors have differente len!")

    results = {
        'sen': [{'count': 0, 'recognized': 0} for _ in range(3)],
        'spe': [{'count': 0, 'true': 0} for _ in range(3)],
    }
    for i, r_tab in enumerate(real):
        r = max(range(3), key=lambda k: r_tab[k])
        p = max(range(3), key=lambda k: pred[i][k] * thresholds[k])
        results['sen'][r]['count'] += 1
        results['spe'][p]['count'] += 1
        if p == r:
            results['sen'][p]['recognized'] += 1
            results['spe'][p]['true'] += 1

    return map(
        lambda x: round(x * 100) / 100,
        [r['recognized'] / r['count'] for r in results['sen']] + [r['true'] / r['count'] for r in results['spe']]
    )