def accuracy(p, t):
    '''
    Fraction of samples that were classified correctly.
    :param p: Multi-dimensional numpy array with the predicted values.
    :param t: Multi-dimensional numpy array with the known values.
    :return: Float value between 0 and 1.
    '''

    return sum([1 for i, j in zip(np.argmax(p, axis=1), np.argmax(t, axis=1)) if i == j]) / float(len(p))
dataset/ETHPy150Open calvinschmdt/EasyTensorflow/easy_tensorflow/evolve_functions.py/accuracy/original