return confusion mat from error functions