Application of Machine Learning methods for centrality determination in heavy ion reactions at the BM@N and MPD@NICA