In this paper we study the
-decomposition, , of functions in metric random walk spaces, a general workspace that includes weighted graphs and nonlocal models used in image processing. We obtain the Euler-Lagrange equations of the corresponding variational problems and their gradient flows. In the case we also study the associated geometric problem and the thresholding parameters describing the behavior of its solutions.