Member-only story
Machine Learning Optimization Methods and Techniques
Make your machine learning models more effective

The principal goal of machine learning is to create a model that performs well and gives accurate predictions in a particular set of cases. In order to achieve that, we need machine learning optimization.
Machine learning optimization is the process of adjusting the hyperparameters in order to minimize the cost function by using one of the optimization techniques. It is important to minimize the cost function because it describes the discrepancy between the true value of the estimated parameter and what the model has predicted.
In this article, we will discuss the main types of ML optimization techniques.
Parameters and Hyperparameters of the Model
Before we go any further, we need to understand the difference between parameters and hyperparameters of a model. These two notions are easy to confuse, but we should not.
- You need to set hyperparameters before starting to train the model. They include a number of clusters, learning rate, etc. Hyperparameters describe the structure of the model.
- On the other hand, the parameters of the model are obtained during the training. There is no way to get them in advance. Examples are weights and biases for neural networks. This data is internal to the model and changes based on the inputs.

To tune the model, we need hyperparameter optimization. By finding the optimal combination of their values, we can decrease the error and build the most accurate model.
How hyperparameter tuning works
As we said, the hyperparameters are set before training. But you can’t know in advance, for instance, which learning rate (large or small) is best in a given case. Therefore, to improve the model’s performance, hyperparameters have to be optimized.
After each iteration, you compare the output with expected results, assess the accuracy, and adjust the hyperparameters if…