def split_confusion_matrix(cm):
    """ Split confusion matrix into it's parts.

    :param cm: 2x2 numpy confusion matrix
    :return: (TP,FP,TN,FN), see http://en.wikipedia.org/wiki/Confusion_matrix
    """

    assert cm.shape == (2,2), "Only binary classifiers supported!"

    tp = cm[0,0]
    fp = cm[1,0]
    tn = cm[1,1]
    fn = cm[0,1]
    return (tp,fp,tn,fn)