def normalize_CM(CF):
    new_CF = np.zeros(np.shape(CF))
    for col in range(0, np.shape(CF)[1]):
        total = np.sum(CF[:, col])
        norm_col = (CF[:, col] / float(total))
        new_CF[:, col] = norm_col
    return new_CF
def normalize_CM(CF):
    new_CF = np.zeros(np.shape(CF))
    for col in range(0, np.shape(CF)[1]):
        total = np.sum(CF[:, col])
        norm_col = (CF[:, col] / float(total))
        new_CF[:, col] = norm_col
    return new_CF