This section explains how the cost function is used to generate weights and bias.
- A for loop will be implemented that will perform gradient descent on the weights and bias to tweak the values until the cost function gets close to 0.
- The loop will iterate over the cost function 100,000 times. Each time, a random value for height and weight from the 29 individuals is selected.
- A summation value, z, is calculated from the random height and weight, and the input is used to calculate a predictedGender score with the sigmoid function.
- The cost function is calculated and added to a list that tracks all cost functions through the 100,000 iterations, allCosts.
- A series of partial derivatives is calculated with respect to the summation ...