'Returns the matrix of classes x predicted classes as a dictionary.'

def __init__(self, classify=(lambda document: True), documents=[]):

    defaultdict.__init__(self, (lambda : defaultdict(int)))
    for (document, type1) in documents:
        type2 = classify(document)
        self[type1][type2] += 1
