Random convex functions

168 Views Asked by At

I am collaborating with a couple of machine learning specialists on a project related to phase retrieval. The problem we are investigating has solutions which are convex 2D functions on a rectangular domain $[0,n]\times [0,m]$. They have asked me to provide them with a selection of such convex functions for use in training their model.

Question: Are there any natural ways to generate random 2D convex functions on a rectangle $[0,n]\times [0,m]$?

This is of course an open ended question. I can conceive several ways to generate random convex functions (e.g. taking the max of random linear functions), but nothing seems particularly natural.

1

There are 1 best solutions below

1
On

Using the fact that the summation of convex functions is convex, you could just sample $N$ random points $x_i$ in $[0,n]\times [0,m]$ and then associate each of them with a curvature $\alpha \sim \cal {U}[0,1]$, and get :

$$ f(x) = \sum_{i=1}^N \alpha_i (x-x_i)^2 $$

You can sample other $\alpha$s, but you get my point.

This is differentiable, easy to obtain, and you can say things about the function given that you know the distributions.