Let's say we are classifying Images of cat , fish and human. Classifying a cat as human is as wrong as classifying it as fish, so here the normal loss functions/ metrics like Confusion matrix is fine.
But in the case of classifying a baby, child, teen, man, old-man. Classifying a child as old man is more wrong than classifying as a teen. So what would be a better metric for a ranking kind of classification?