Logistic regression

can we take squared error in place of log likelihood in logistic regression?

Firstly logistic regression has no concept of residuals so it can’t use least square error.

Secondly, In classification scenarios, we often use gradient-based techniques to find the optimal values for coefficients by minimizing the loss function. Hence if the loss function is not convex, it is not guaranteed that we will always reach the global minima, rather we might get stuck at local minima. MSE loss function for logistic regression is non-convex and not recommended.

You can check this article for more info :