title: How to code cross entropy error function in matlab
body: <p>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 </p>
  
  <p>E(w) = 1/N* summation(n=1..N) ln(1+ exp( -y(n)*w*x(n) ) ) </p>
  
  <p>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.</p>
  
  <p>Each evaluation of 'E' requires processing of all the training examples.</p>
  
  <p>Thank you very much</p>