optimization the cost function we described earlier is function of th and hence we need to maximize the previous function and find the set of th that gives us the maximum value (normally we will minimize the cost functionbut here we have taken log and hence we will maximize the log functionthe value th that we obtain by represents the model (parametersthat we wanted to learn the basic idea of maximizing or minimizing function is that you differentiate the function and find the point where the gradient is zero that is the point where the function is taking either minimum or maximum value but we have to keep in mind that the function that we have is nonlinear function in the parameter th hence we won' be able to directly solve for the optimal values of th this is where we introduce the concept of the gradient descent method in the simplest termsgradient descent is the process in which we calculate the gradient of the function we want to optimize at each point and then keep moving in the direction of negative gradient values here by movingwe mean to update the values of th according to the gradient that we calculate we can calculate the gradient of the cost function with respect to each component of the parameter vector as followsp hq pq by repeating this calculation for each of the component of parameter vectorwe can calculate the gradient of the function with respect to the whole parameter vector once we get the gradientthe next step is to update the new set of parameter vector values using this equation ( : hq ij herea represents the small step we want to take in the direction of the gradient is hyperparameter of the optimization process (you can think of it as learning rate or learning step sizeand its value can determine whether we reach global minima or local one if we keep reiterating the processwe will reach point where our cost function will not change much irrespective of any small update that we make to values of th using this methodwe can obtain the optimal set of parameter values keep in mind that this is simple description of gradient to make things easy to understand and interpret usually there are many other considerations involved in solving an optimization problem and vast set of challenges the main intent of this section is to make you aware of how optimization is an essential part of any machine learning problem model building examples the future of this book are dedicated to build and tune models on real-world datasets so we will be doing lot of model buildingtuningand evaluation in general in this sectionwe want to depict some examples of each category of models that we discussed in the previous section this will serve as ready reckoner starting guide for our model building exploits in the future