Finite mixture estimation algorithm for arbitrary function approximation