implement algorithm of Logistic Regression

first try