Logistic regression before MNIST