$x$-axes correspond to $N_{gal}$. The top panel was obtained using the SVM method and the bottom panel shows the analogue for kNN. We slightly overpredict the number of halos with 1 galaxy, and underpredict elsewhere, especially when using the SVM. The true number of galaxies in the test set is 149,064; for SVM we predict 140,519 and for kNN we predict 144,346. This phenomenon was pointed out previously and will be elaborated on below.

The galaxy correlation function $\xi(r)$ can also be used to test the robustness of the ML results. This test is especially interesting as $\xi(r)$ is the principal observable for large-scale structure analyses, the key motivation behind constructing mock galaxy catalogs. We create a mock galaxy catalog using the $N_{gal}$ values predicted by our ML algorithms. We place these galaxies randomly within their host halos according to an NFW profile in the radial direction and random point generation on a sphere in the angular directions. We calculate the correlation function for the training, true test set and predicted test set galaxies in $5{h^{-1}\rm{Mpc}}$ bins in the range $5{h^{-1}\rm{Mpc}}$-$60{h^{-1}\rm{Mpc}}$ (suitable for redshift-space distortion analyses from large-scale structure). Figure \[fig:milxi\] shows the resulting $\xi(r)$ using SVM (top) and kNN 