Perish song forced the switch, so I can finally get my rocks up without that pesky Espeon bouncing them right back. The shedinja switch surprised me however as that was a very risky move if I had leech seed, which was still possible at this point due to only revealing rocks. If I had changed to anything else though, this would have been perfect so perhaps this was an overprediction on his part.
Just going to point out that his ditto had transformed into your ferro at the start of the match so he knew your moveset beforehand.