initial draft of linear modelling using stochastic gradient descent