The Wayback Machine - https://web.archive.org/web/20241001081343/https://www.geeksforgeeks.org/unconstrained-multivariate-optimization/
Open In App

Unconstrained Multivariate Optimization

Last Updated : 17 Jul, 2020
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow
Wikipedia defines optimization as a problem where you maximize or minimize a real function by systematically choosing input values from an allowed set and computing the value of the function. That means when we talk about optimization we are always interested in finding the best solution. So, let say that one has some functional form(e.g in the form of f(x)) and he is trying to find the best solution for this functional form. Now, what does best mean? One could either say he is interested in minimizing this functional form or maximizing this functional form.
Generally, an optimization problem has three components.

minimize f(x),
w.r.t x , 
subject to a < x < b 

where, f(x) : Objective function 
x : Decision variable 
a < x < b : Constraint 
 

What’s a multivariate optimization problem? In a multivariate optimization problem, there are multiple variables that act as decision variables in the optimization problem.

z = f(x1,x2,x3…..xn)

So, when you look at these types of problems a general function z could be some non-linear function of decision variables x1,x2,x3 to xn. So, there are n variables that one could manipulate or choose to optimize this function z. Notice that one could explain univariate optimization using pictures in two dimensions that is because in the x-direction we had the decision variable value and in the y-direction, we had the value of the function. However, if it is multivariate optimization then we have to use pictures in three dimensions and if the decision variables are more than 2 then it is difficult to visualize. What’s unconstrained multivariate optimization? As the name suggests multivariate optimization with no constraints is known as unconstrained multivariate optimization. Example:

min f(x̄)
w.r.t x̄
x̄ ∈ Rn

So, when you look at this optimization problem you typically write it in this above form where you say you are going to minimize f(x̄), and this function is called the objective function. And the variable that you can use to minimize this function which is called the decision variable is written below like this w.r.t x̄ here and you also say x̄ is continuous that is it could take any value in the real number line.

The necessary and sufficient conditions for x̄* to be the minimizer of the function f(x̄*)

In case of multivariate optimization the necessary and sufficient conditions for x̄* to be the minimizer of the function f(x̄) are:

First-order necessary condition: ∇ f(x̄*) = 0

Second-order sufficiency condition: ∇ 2 f(x̄*) has to be positive definite.

where,
 \nabla f(x^*) = Gradient = \begin{bmatrix} \partial f/ \partial x_1\\ \partial f/ \partial x_2\\ ...\\ ...\\ \partial f/ \partial x_n\\ \end{bmatrix} ,and  \nabla ^2 f(x^*) = Hessian = \begin{bmatrix} \partial ^2f/ \partial x_1^2 & \partial ^2f/\partial x_1 \partial x_2 & ... & \partial ^2f/ \partial x_1 \partial x_n\\ \partial ^2f/\partial x_2 \partial x_1 & \partial ^2f/ \partial x_2^2 & ... & \partial ^2f/ \partial x_2 \partial x_n\\ ... & ... & ... & ...\\ ... & ... & ... & ...\\ \partial ^2f/\partial x_n \partial x_1 & \partial ^2f/\partial x_n \partial x_2 & ... & \partial ^2f/ \partial x_n^2\\ \end{bmatrix}
Let us quickly solve a numerical example on this to understand these conditions better.

Numerical Example

Problem:
min x_1 + 2x_2 + 4x_1 ^2 - x_1 x_2 + 2x_2 ^2

Solution:
According to the first-order condition

 \nabla f(x^*) = \begin{bmatrix} \partial f/ \partial x_1\\ \partial f/ \partial x_2\\ \end{bmatrix} = \begin{bmatrix} 1 + 8x_1 - x_2\\ 2 - x_1 + 4x_2\\ \end{bmatrix} = \begin{bmatrix} 0\\ 0\\ \end{bmatrix}
By solving the two equation we got value of x_1 ^* and x_2 ^* as
 \begin{bmatrix} x_1 ^*\\ x_2 ^*\\ \end{bmatrix} = \begin{bmatrix} -0.19\\ -0.54\\ \end{bmatrix}
To check whether this is a maximum point or a minimum point, and to do so we look at the second-order sufficiency condition. So according to the second-order sufficiency condition:
 \nabla ^2 f(x^*) = \begin{bmatrix} \partial ^2f/ \partial x_1^2 & \partial ^2f/\partial x_1 \partial x_2\\ \partial ^2f/\partial x_2 \partial x_1 & \partial ^2f/ \partial x_2^2\\ \end{bmatrix} = \begin{bmatrix} 8 & -1\\ -1 & 4\\ \end{bmatrix}
And we know that the Hessian matrix is said to be positive definite at a point if all the eigenvalues of the Hessian matrix are positive. So now let's find the eigenvalues of the above Hessian matrix. To find eigenvalue refer here. And to find eigenvalue in python refer here. So the eigenvalue of the above hessian matrix is
 \begin{bmatrix} \lambda _1\\ \lambda _2\\ \end{bmatrix} = \begin{bmatrix} 3.76\\ 8.23\\ \end{bmatrix}
So the eigenvalues for this found to be both positive; that means, that this is a minimum point.


Previous Article
Next Article

Similar Reads

Unconstrained Optimization Techniques in Neural Networks
Unconstrained optimization plays a crucial role in the training of neural networks. Unlike constrained optimization, where the solution must satisfy certain constraints, unconstrained optimization seeks to minimize (or maximize) an objective function without any restrictions on the variable values. In neural networks, this objective function is typ
4 min read
Uni-variate Optimization vs Multivariate Optimization
Wikipedia defines optimization as a problem where you maximize or minimize a real function by systematically choosing input values from an allowed set and computing the value of the function. That means when we talk about optimization we are always interested in finding the best solution. So, let say that one has some functional form(e.g in the for
4 min read
Multivariate Optimization and its Types - Data Science
Wikipedia defines optimization as a problem where you maximize or minimize a real function by systematically choosing input values from an allowed set and computing the value of the function. That means when we talk about optimization we are always interested in finding the best solution. So, let say that one has some functional form(e.g in the for
4 min read
Multivariate Optimization - KKT Conditions
What's a multivariate optimization problem? In a multivariate optimization problem, there are multiple variables that act as decision variables in the optimization problem. z = f(x1, x2, x3.....xn) So, when you look at these types of problems a general function z could be some non-linear function of decision variables x1, x2, x3 to xn. So, there ar
4 min read
Multivariate Optimization - Gradient and Hessian
In a multivariate optimization problem, there are multiple variables that act as decision variables in the optimization problem. z = f(x1, x2, x3.....xn) So, when you look at these types of problems a general function z could be some non-linear function of decision variables x1, x2, x3 to xn. So, there are n variables that one could manipulate or c
3 min read
Multivariate Optimization with Equality Constraint
Wikipedia defines optimization as a problem where you maximize or minimize a real function by systematically choosing input values from an allowed set and computing the value of the function. That means when we talk about optimization we are always interested in finding the best solution. So, let say that one has some functional form(e.g in the for
5 min read
Hyperparameter Optimization Based on Bayesian Optimization
In this article we explore what is hyperparameter optimization and how can we use Bayesian Optimization to tune hyperparameters in various machine learning models to obtain better prediction accuracy. Before we dive into the how's of implementing Bayesian Optimization, let us learn what is meant by hyperparameters and hyperparameter optimization. H
7 min read
Vector Autoregression (VAR) for Multivariate Time Series
Vector Autoregression (VAR) is a statistical tool used to investigate the dynamic relationships between multiple time series variables. Unlike univariate autoregressive models, which only forecast a single variable based on its previous values, VAR models investigate the interconnectivity of many variables. They accomplish this by modeling each var
6 min read
Optimization techniques for Gradient Descent
Gradient Descent is a widely used optimization algorithm for machine learning models. However, there are several optimization techniques that can be used to improve the performance of Gradient Descent. Here are some of the most popular optimization techniques for Gradient Descent: Learning Rate Scheduling: The learning rate determines the step size
4 min read
ML | ADAM (Adaptive Moment Estimation) Optimization
Prerequisite: Optimization techniques in Gradient Descent Gradient Descent is applicable in the scenarios where the function is easily differentiable with respect to the parameters used in the network. It is easy to minimize continuous functions than minimizing discrete functions. The weight update is performed after one epoch, where one epoch repr
2 min read
Introduction to Ant Colony Optimization
The algorithmic world is beautiful with multifarious strategies and tools being developed round the clock to render to the need for high-performance computing. In fact, when algorithms are inspired by natural laws, interesting results are observed. Evolutionary algorithms belong to such a class of algorithms. These algorithms are designed so as to
6 min read
Uni-variate Optimization - Data Science
Optimization is an important part of any data science project, with the help of optimization we try to find the best parameters for our machine learning model which will give the minimum loss value. There can be several ways of minimizing the loss function, However, generally, we use variations of the gradient method for our optimization. In this a
6 min read
How to Implement Various Optimization Algorithms in Pytorch?
Optimization algorithms are an essential aspect of deep learning, and PyTorch provides a wide range of optimization algorithms to help us train our neural networks effectively. In this article, we will explore various optimization algorithms in PyTorch and demonstrate how to implement them. We will use a simple neural network for the demonstration.
6 min read
Grey wolf optimization - Introduction
Optimization is essentially everywhere, from engineering design to economics and from holiday planning to Internet routing. As money, resources and time are always limited, the optimal utilization of these available resources is crucially important. In general, an optimization problem can be written as optimize [Tex]f_1(x), ..., f_i(x), ..., f_N(x)
5 min read
Whale Optimization Algorithm (WOA)
The step-by-step procedure to obtain an optimum value (maximum or minimum) of an objective function is called an Optimization Algorithm. Meta-heuristic optimization algorithms are becoming more and more popular in engineering applications because they: rely on rather simple concepts and are easy to implementdo not require gradient informationcan by
3 min read
Particle Swarm Optimization (PSO) - An Overview
The process of finding optimal values for the specific parameters of a given system to fulfill all design requirements while considering the lowest possible cost is referred to as an optimization. Optimization problems can be found in all fields of science. Conventional optimization algorithms (Deterministic algorithms) have some limitations such a
3 min read
Henry gas solubility optimization
The method of identifying optimal settings for the specific parameters of a particular process of fulfilling all design objectives while considering the lowest feasible cost is referred to as an optimization. Problems with optimization can be seen in all areas science, so it is vital to design new optimization algorithms. Otherwise, standard optimi
4 min read
Brain storm optimization
Optimization is usually tasked to identify the best solution(s) for some specific problem. A problem with optimization in Rn or simply a problem with optimization is [Tex]f: R_n \rightarrow R_m [/Tex] , whereby Rn and Rm represent decision space and objective space respectively. The fitness value or fitness value vector in the target area are conne
5 min read
Implementation of Teaching Learning Based Optimization
The previous article Teaching Learning Based Optimization (TLBO) talked about the inspiration of teaching learning-based optimization, it's mathematical modeling and algorithms. In this article we will implement Teaching learning-based optimization (TLBO) for two fitness functions 1) Rastrigin function 2) Sphere function. The algorithm will run for
7 min read
Implementation of Particle Swarm Optimization
Previous article Particle Swarm Optimization - An Overview talked about inspiration of particle swarm optimization (PSO) , it’s mathematical modelling and algorithm. In this article we will implement particle swarm optimization (PSO) for two fitness functions 1) Rastrigin function 2) Sphere function. The algorithm will run for a predefined number o
7 min read
Cat Swarm Optimization
Nature is replete with social compartments to carry out various jobs. Even if the final goal of all persons and collective conduct is survival, for various reasons: hunting, protection, navigation and foraging animals work and interact in groups, herds, schools, colonies and flocks. It is very interesting that creatures find the optimal situations
5 min read
Dragon fly Optimization
Due to its simplicity, easy operation, capacity to protect against local optima, and the problem of derivatives free, Metaheuristic was frequently employed throughout the previous three decades. Exploration and exploitation are two fundamental metaheuristic features. The first one shows how the algorithm is capable of detecting new search areas, wh
4 min read
A Brief Introduction to Proximal Policy Optimization
Proximal Policy Optimisation (PPO) is a recent advancement in the field of Reinforcement Learning, which provides an improvement on Trust Region Policy Optimization (TRPO). This algorithm was proposed in 2017, and showed remarkable performance when it was implemented by OpenAI. To understand and appreciate the algorithm, we first need to understand
4 min read
Pathfinder Optimization Algorithm
Nature is full of social behaviours for performing different tasks. Although the ultimate goal of all individuals and collective behaviours is survival, creatures cooperate and interact in groups, herds, schools, colonies, and flocks for several reasons: hunting, defending, navigating, and foraging. In order to mimic these characteristics of animal
3 min read
Implementation of Henry gas solubility optimization
Article Henry gas solubility optimization (HGSO) talked about the inspiration of Henry gas solubility optimization, its mathematical modelling and algorithm. In this article, we will implement Henry gas solubility optimization (HGSO) for the Sphere fitness function. Sphere Fitness function Sphere function is a standard function for evaluating the p
5 min read
CatBoost Bayesian optimization
Bayesian optimization is a powerful and efficient technique for hyperparameter tuning of machine learning models and CatBoost is a very popular gradient boosting library which is known for its robust performance in various tasks. When we combine both, Bayesian optimization for CatBoost can offer an effective, optimized, memory and time-efficient ap
10 min read
CatBoost Optimization Technique
In the ever-evolving landscape of machine learning, staying ahead of the curve is essential. One such revolutionary optimization technique that has been making waves in the data science community is CatBoost. Developed by Yandex, a leading Russian multinational IT company, CatBoost is a high-performance, open-source library for gradient boosting on
7 min read
Optimization in Neural Networks and Newton's Method
In machine learning, optimizers and loss functions are two components that help improve the performance of the model. A loss function measures the performance of a model by measuring the difference between the output expected from the model and the actual output obtained from the model. Mean square loss, hinge loss, and log loss are some examples o
12 min read
Hyperparameters Optimization methods - ML
In this article, we will discuss the various hyperparameter optimization techniques and their major drawback in the field of machine learning. What are the Hyperparameters?Hyperparameters are those parameters that we set for training. Hyperparameters have major impacts on accuracy and efficiency while training the model. Therefore it needed to be s
7 min read
Implementation of Whale Optimization Algorithm
Previous article Whale optimization algorithm (WOA) talked about the inspiration of whale optimization, its mathematical modeling and algorithm. In this article we will implement a whale optimization algorithm (WOA) for two fitness functions 1) Rastrigin function    2) Sphere function  The algorithm will run for a predefined number of maximum itera
6 min read
Practice Tags :