1

I'm trying to make a 3d plot that is non-convex. I googled a little bit but didn't find a non-convex function that is as easy to understand as the mean squared error.

I know the mean squared error is defined as

${\displaystyle \operatorname {MSE} ={\frac {1}{n}}\sum _{i=1}^{n}(Y_{i}-{\hat {Y_{i}}})^{2}.}$

which is a non-convex function, with 2d plot similar to the one shown below.

enter image description here

What about 3d plot. Could someone give a simple non-convex function with 3d plot similar to the one shown below?

enter image description here

I also tried Stochastic gradient Langevin dynamics

enter image description here

which involves too much things to understand for me

JakeMZ
  • 281

1 Answers1

2

On this page:

http://infinity77.net/go_2021/scipy_test_functions.html#scipy-test-functions-index

And subsequent pages you can find hundreds of 3D representations of non-convex, multi-modal functions.

I am not clear why you think that a 2D representation of the mean square function has to look like the picture you posted. That might be one specific example of how it might look, but by no means the MSE function has to be multi-modal: the shape of the MSE is a function of the underlying model you are using, and does not depend on the fact that it is a sum of squares.