starting logistic regression code based on Prf. Ng ML course