I want to write a code to find projected gradient descent of a function. (f(x) is gradient of a function, it is not the function itself)
I'm thinking about define a function proj(). But I don't understand how to write the argmin norm(x-y)^2 part
Can you give me an example on how to write this code?