What is optimization? Roughly speaking, optimization is to minimize or maximize a function (which is called the objective function) under some constraints.
For example, we some several ways to return the campus from Hongqiao Station: by taxi (Didi / Gaode), by metro or by bus (Hongqiao 4 Line / Min-Hong 2 Line), etc. We would like to minimize the time, but our money is limited. This is an optimization problem.
Formally, an optimization problem can be defined by
Suppose there are
For each
Consider the free falling motion. The height and the time of a free fall follow the law
Suppose we have the following data and we would like to use
10 | 20 | 30 | 40 | |
---|---|---|---|---|
1.011 | 2.019 | 3.032 | 4.041 |
However, before solving this problem, we should first ask the following question: if we choose a certain value of
Generally, we have the following question. Let
If we only have two numbers
We need to extend the concept of the absolute value to measure the distances between vectors in
Given a vector space
1. (Nonnegativity)
2. (Positive definiteness)
3. (Absolute homogeneity)
4. (Triangle inequality)
This definition is not constructive. That means any function
Why do
The triangle inequality follows the so-called Minkowski inequality, which we will prove several weeks later.
Another example is called the canonical norm, which is induced by the inner product. Usually, the inner product of two vectors
An inner product for a vector space
Given a vector space with an inner product, the canonical norm is given by
The inner product is given by
For any vector space with any inner product and the canonical norm, it holds that
We now return to the linear regression problem. A famous and well-applied method is the least square method, which use the
Given
Assume
Given a data set
We first consider the problem of computing the distance from a point to a hyperplane.
Assume the hyperplane is
Now we have
Note that
The constraints