# Lesson 2: Introduction to Neural Networks_II

#### – Logistic Regression:

• Take your data
• Pick a random model
• Calculate the error
• Minimize the error, and obtain a better model

#### – Gradient Calculation

In order to minimize the error function, we need to take some derivatives. So let’s compute the derivative of the error function.

sigmoid function :

the error formula is: