Bayesian nonparametrics for inference of ecological dynamics