This example uses the public data set from
Gorman, R. P., and Sejnowski, T. J. (1988). "Analysis of Hidden Units in a Layered Network Trained to Classify Sonar Targets" in Neural Networks, Vol. 1, pp. 75-89.
This paper used neural network to differentiate sonar returns of rocks vs mines. I use this same data set with a logistic regression model to do the same task. This is primarily an exercise to implent logistic regression in python and I will not compare performance with the neural network in the paper.