MLP classifier — a small neural net on a CSV
A multilayer perceptron stacks linear maps and nonlinearities. With one hidden layer of modest width it can bend a decision boundary that logistic regression must leave straight. Training is not convex: a different seed can reach a different set of weights with a similar loss. Report the seed with the accuracy.
The hidden layer width is capacity. A width of 16 on a few hundred rows is plenty. A width of 512 will fit the training labels and miss the test labels unless you stop early or penalize the weights. The learning-rate schedule matters as much as the width: too large and the loss oscillates, too small and it never leaves the starting guess.
Scale the inputs. A column in the thousands saturates the nonlinearity and the gradient for that weight vanishes. Standard scaling is the precondition, not an optional polish.
Settings that change this fit
- hidden layer sizes
- Width and depth. Start with one layer. Add a second only after the first one underfits the training data.
- alpha
- L2 penalty on the weights. Raise it when training accuracy is far above validation accuracy.