I have to minimize the empirical risk of this modified loss function L*:

L*( t, y ) = L( t, y ) - L( t, -y ) where L( t, y ) = log(1 + exp( -ty )) is the logistic Loss.

Now if I do this in CVX I get the following:

Disciplined convex programming error:

Illegal operation: {convex} - {convex}

Is there any other way to write it ?

I’m doing this where t = w’x:

cvx_begin

variables w(p+1)

s=0;

for i=1:n

s=s + (log(1+exp( -y(i)*X(i,:)*w )) - log(1+exp( y(i)*X(i,:)*w )));

end

minimize (s)

cvx_end

I’ve also tried with the more compact matrix vector notation using the log sum exp but I get the same error.

Thanks.