Introducing spatio-temporal dependence in clustering: from a parametric to a nonparametric approach