I have a set of positive and negative samples in 2D (x, y), and I would like to fit a curve f to this data set so that f(x, y_c) is increasing in x and f(x_c, y) is increasing in y. The function f(x, y) can be thought of as the probability that a new random sample from point (x, y) is positive. The function f can be arbitrary (I wouldn't assume that it's linear or logarithmic or even a fixed-degree polynomial), but it should be smooth. For example, one idea is to bucket the samples into rectangles, compute the probability of a positive sample from each bucket, and then deal with any violations to monotonicity. (This is a little simple; it might be preferable to incorporate the data from neighboring buckets in some way.)
Is there a standard technique for solving this problem?