# Logistic Regression

I just finished the code for a Logistic Regression classification model. I worked on a Card transaction processing system and there was a requirement for identifying whether a card transaction is fradulent or not. We did not use any classification model but if we had had a training set of historical data we could have used this learning algorithm.
Most of the time it is the lack of skills that affects software projects that I have been involved with.

### Cost function for Logistic Regression

$J(\theta) = 1/m \sum_{i=1}^{m}[-y^{(i)} log( h_\theta(x^{(i)}) - (1-y^{(i)})log( 1 - h_\theta(x^{(i)}))] ;$

$(\partial J(\theta)/\partial \theta_j ) = 1/m \sum_{i=1}^{m} ( h_\theta(x^{(i)}) - y^{(i)}) x^{(i)}_j$