Implementing logistic regression from scratch

Screenshot taken from Coursera