A Dirichlet process mixture model avoids fixing the number of occupied functions. Let be the finite-dimensional Gaussian process law on the common input grid and specify
A draw from a Dirichlet process is almost surely discrete, so several coincide and thereby form clusters. The number of occupied clusters is random and can grow with the data.