Please compare Logistic Regression and Neural Networks.
Answer
Logistic regression is a straightforward, linear model suited to linearly separable data, offering good interpretability and fast, simple training. Neural networks are powerful non-linear models capable of capturing intricate patterns in large datasets, often at the expense of interpretability and higher computational demands.
(1) Expressiveness: Logistic regression draws one hyperplane; neural networks compose hidden layers into arbitrarily curved boundaries.
(2) Workflow: Logistic regression often needs manual feature engineering; neural networks learn feature representations automatically.
(3) Cost: Logistic regression trains in seconds with low overfitting risk when features are well chosen; networks need more data, compute, and regularization.

Figure 1: Logistic regression is a neural network: an input layer plus a single output neuron with a sigmoid activation and no hidden layer, the simplest possible network, for binary classification.
Mathematical Formulation:
Where:
- The first line is logistic regression: one linear score through a sigmoid
, equivalent to a 0-hidden-layer network.
- The second line is a general neural network: compositions of weight matrices
, biases
, and non-linearities
, with output map
.
- Setting the number of hidden layers to zero and
recovers logistic regression exactly.
| Feature | Logistic Regression | Neural Networks (NN) |
|---|---|---|
| Model Type | Linear | Non-linear, multi-layer |
| Architecture | Single-layer (no hidden layers) | Multi-layer (can be deep) |
| Non-linearity | Can’t model non-linear relationships directly | Can capture complex non-linear patterns |
| Feature Engineering | Often needed manually | Learns feature representations automatically |
| Interpretability | High | Low (acts like a black box) |
| Training Time | Fast, simple to train | Slower, needs more compute & data |
| Overfitting Risk | Low (if features are well-chosen) | Higher (requires regularization) |
| Common Use Cases | Simple classification problems (e.g., churn prediction) | Complex tasks (e.g., image, text, speech recognition) |
Leave a Reply