I try to write both percentages and absolute values like " 15 (20%) " on the cells of heatmap. I can do the percentages per class via code below. But, how can I do that for both?
h_map = sns.heatmap(pyArray_cf / np.sum(pyArray_cf, axis=1), vmin=0, vmax=1, annot=True, cmap="Blues",
ax=ax1, fmt='.2%',
mask=pyArray_cf==0,
xticklabels=x_axis_labels_1,
yticklabels=y_axis_labels_1)
Also, I would like to mask the cells with 0 values (0 times confusion).