Optimization techniques are used to minimize the error or cost function used in most machine learning algorithms.