---
# System prepended metadata

title: Number of halo inference

---

# Number of halo inference

* For this we use a mixture of gaussian model. The inherent issue is that number of halos are discrete whereas all the models are trained using continuous numbers. Therefore, we create a new dataset where the number of halos are staggered by a gaussian of width $\sigma$. So the histogram looks like this:

![](https://i.imgur.com/nlO1rPF.png)


* So now we know the mean and variance of all the gaussians and we only need to train on the probability of the any gaussian in the mixture model. We again use CNNs to extract the features and use them to train on the p-values with KL loss.

* Recovered distribution looks as follows for full, high and low density bins:

![](https://i.imgur.com/eAAL4x5.png)
![](https://i.imgur.com/EPf7SKy.png)
![](https://i.imgur.com/vhIroCu.png)


