I have recently come across a Matlab implementation that appears to be using only the first term (i.e. in itself a product) of the typical logistic regression cost function.
f = - full(mean(sum(Y.*log(Yr)))); f = f + 0.5*lambda*sum(W(:).^2);
When I create a two class simple dataset and adjust the cost function to its traditional form I still get separation between classes albeit the vector of parameters are slightly different (for a fixed lambda regularizer in both cases).
f = - full(mean(sum(Y.*log(Yr) + (1-Y).*log(1-Yr)))); f = f + 0.5*lambda*sum(W(:).^2);
Naturally, my question is: Has this choice been deliberate ? Is the first objective function sufficient ? Or is it just an obvious inconsistency.