Can someone help me in coding the cross entropy loss function in Matlab. I want to code it in single line using @ i.e function handle. The error function is
E(w) = 1/N* summation(n=1..N) ln(1+ exp( -y(n)*w*x(n) ) )
N is the total number of training examples. 'w' are the parameters of the function. 'x' is a vector containing features of a training example and 'y' is the corresponding label.
Each evaluation of 'E' requires processing of all the training examples.
Thank you very much