This is sample code for fitting a linear model using variants of gradient descent. sgd.py implements unregularized and regularized stochastic logistic regression for two classes. bgp.py implements batch gradient descent for linear regression