There are basic ways to qualitatively classify deviations from bijectivity of a function $f: x \to y$, e.g. non-injective, non-surjective, non-existence of an inverse: more generally non-monomorphic, non-epimorphic.
Are there two "natural" quantitative measures of deviation from injectivity and surjectivity?
Is there one natural quantitative measure of "total deviation" from bijectivity (combining both injective/surjectivity violation)? And from isomorphic?
Brain storm: Relative entropy of $\{f^{-1}(y) \}$, i.e. the preimages of $f$, seems one relevant to measuring relative injectivity? Relative measure or cardinality $|Im(f)/Cod(f)|$ seems one way to measure surjectivity? These both invoke additional concepts, e.g. probability or measure. I am sure mathematicians will have clearer and better ways that I can't think of. Any ideas or references will be most welcome.
The above mostly relates to functions between sets. How does one ask and answer the corresponding questions for structure-preserving functions, i.e. functorial functions, such as monotone, equivariant, homomorphic, continuous? (Apologies if this latter is asking too much in one question!).
Thanks!