In the process of opimizing the obj function in Robust SVDD. How to obtain the gradient of the objective function using the chain rule? $$J(R, c) = R + C \sum_{i=1}^N max(0,||x_i - c||-R)$$
R is the radius of the boundary and c is the vector representing the center of the boundary. And x_i is the one of the data points.