Equivalence class of functions with commutative diagram. Let $S$, $T$ be sets, and $f,g: S \to T $ be function satisfying a condition that, there exist $\phi : S \to S, \rho : T \to T$, bijections, such that $f = \rho^{-1} \circ g \circ \phi$. Then we call it $f\sim g$. I know $\sim$ is equivalence relation. My question is, what does the family of all equivalence class looks like?
My first observation is that if $f \sim g$, and $f(x)=f(y)$ then $g(\phi^{-1}(x))=g(\phi^{-1}(x))$. So my guess is it is classified by functions fiber, namely, $fiber(f) = \{ f^{-1}(t) | t \in T\}$, so the family of equivalence class is $\{ fiber(f) | f\in Func(S,T)\}$. But is it right? how can I prove it rigorously?
 A: This is not a full answer, merely an extended comment. I'll write $T^S$ for the set of functions from $S$ to $T$. In general, I don't think there is an obvious characterization of $T^S/{\sim}$, except maybe in the finite case. Let me illustrate by some examples.
Consider the set $2^3$ of functions from a $3$-element set $\{0,1,2\}$ to a $2$-element set $\{0,1\}$. One can think of such a function as a binary word with exactly three letters: for example, the function that maps $0 \mapsto 0$, $1 \mapsto 0$ and $2 \mapsto 1$ can be thought of as the word $001$. In this case, we have two equivalence classes, namely, the constant functions and the nonconstant ones:
$$ 2^3/{\sim} = \{\{000,111\},\{001,010,011,100,101,110\}\}.$$
Note that in this simple example we already see that there are more than two distinct fibers: we have for instance $\operatorname{fiber}(000) = \{\{1,2,3\},\emptyset\}$, $\operatorname{fiber}(001) = \{\{1,2\},\{3\}\}$ and $\operatorname{fiber}(010) = \{\{1,3\},\{2\}\}$. Thus your claim appears not to hold.
I haven't worked out all the details, but I believe that we can understand the finite case as follows. Consider the set $m^n$ of functions from a $m$-element set to a $n$-element set. As above, an element of $m^n$ can be thought of as a word of length $n$ on the letters $\{0,1,\ldots,m-1\}$.There is an action of the product symmetric group $S_n \times S_m$ on $m^n$ given by the following procedure: an element of $S_n$ permutes the letters of the word in $m^n$, and then an element of $S_m$ permutes the symbols belonging to $\{0,1,\ldots,m-1\}$ that appear in the word. I believe that the equivalence classes in $m^n$ correspond precisely to the orbits under this action:
$$ (m^n/{\sim}) \cong (m^n/(S_n \times S_m)).$$
As an exercise/sanity check, one may look at the case $3^3$ and check that there are three equivalence classes: the constant functions, the bijections, and the rest. These equivalence classes have respective cardinalities $3$, $6$ and $18$. Note that these numbers divide $36 = 3! \times 3! = \lvert S_3 \times S_3 \rvert$, which makes sense if our claim is to hold: for example, the stabilizer of a function which belongs to the "rest" (i.e., is neither constant nor a bijection), say $001$, consists exactly of $(\mathit{id},\mathit{id}) \in S_3 \times S_3$ and $((12),\mathit{id}) \in S_3 \times S_3$, so that the orbit of $001$ has cardinality $\lvert S_3 \times S_3 \rvert/\operatorname{Stab}(001) = 36/2 = 18$.
Finally, here is some food for thought in the infinite case. Let $V$, $W$ be finite-dimensional vector spaces. In linear algebra, we learn that two linear maps $f,g:V \to W$ are equivalent in the way you propose (but under the stronger requirement that $\phi$ and $\rho$ be linear) if and only if $\operatorname{rank}(f) = \operatorname{rank}(g)$. Thus, under this added linearity constraint, we see that there are finitely many equivalence classes, and moreover these equivalence classes are classified by a natural number. However, if we drop linearity and work in the category of sets, I have no idea how to even start analyzing the problem in this amount of generality. Maybe it is easier if we first restrict our attention to countably infinite sets.
