Logistic regression LR based on Python+Theano implementation (with detailed comments)