Singular value decomposition (We recommend a Singular value decomposition)
Original David Austin
Original link: HTTP://WWW.AMS.ORG/SAMPLINGS/FEATURE-COLUMN/FCARC-SVD
Translator: Richardsun (Sun Zhenlong)
In this article, we look at the process of matrix singular value decomposition with a geometrical perspective, and enumerate some applications of singular value decomposition.
Introduced
Matrix singular value decomposition is a must-learn part of Undergraduate mathematics course, but it is often neglected by everyone. This decomposition in addition to very intuitive, more important is very practical value. For example, Netflix, an online film leasing company, offers a hefty $1 million bonus to people who can improve their film recommendation system by 10% accuracy. Surprisingly, this seemingly simple problem is very challenging, and the teams involved are using very complex technologies to solve them, and the essence of these technologies is singular value decomposition.
Singular value decomposition in simple terms, it is in a convenient and efficient way to decompose the matrix of our interests into simpler and more intuitive matrix product. In this paper, the process of singular value decomposition is observed from the perspective of geometry, and some applications of singular value decomposition are enumerated.
geometric interpretation of linear transformations
First, let's look at a simple matrix with only two rows and two columns. The first example is a diagonal matrix
From a geometrical point of view, a matrix can be described as a transformation: a matrix multiplication transforms a point (x, y) on a plane to another point (3x, y):
The effect of this transformation is as follows: The plane is stretched 3 times times in the horizontal direction and has no change in the vertical direction.
Look at this matrix again.
It will have the following effect
However, this diagram does not seem to be able to concisely and clearly describe the geometric effect of the above matrix transformation. However, if we rotate the grid 45 degrees, we'll look at it.
Ah ha! We see now that this new grid is transformed in a way that is exactly the same way as the original grid is converted by a diagonal matrix: The grid is stretched 3 times times in a certain direction.
This is, of course, a special result, because the matrix m is symmetrical, in other words, the transpose ofm (obtained by the diagonal entry of the interchange matrix) is also equal to m. If we have a symmetric matrix of 2*2, it can be proved that we can always rotate the grid through the plane, so that the effect of the matrix transformation is exactly two vertical direction of the mesh or specular reflection. In other words, the symmetric matrix behaves like a diagonal matrix.
More mathematically, given a symmetric matrix M, we can find a set of orthogonal vector VI that makes Mvi equal to the product of VI and scalar;
M vi =λiVI
Here the λi is scalar. In a geometrical sense, this means that the VI is simply stretched or reflected when it is multiplied by the matrix M . Because of this nature, we call VI a eigenvector of M , and scalar λi are called eigenvalues. An important fact that can be proved is that the characteristic vectors of different eigenvalues of a symmetric matrix are orthogonal. If we align the eigenvectors of a symmetric matrix with the grid, the way the matrix stretches or reflects the mesh is exactly the same as the way the matrix stretches or reflects the eigenvectors.
The geometric interpretation of the linear transformation described above is simple: the mesh is simply stretched in one direction. For a more general matrix, the question we're going to ask is: can we find an orthogonal mesh that, under matrix transformation, becomes another orthogonal grid? Let's finally consider an example of an asymmetric matrix:
The geometric effect produced by this matrix is shear (shear).
It is easy to find a family of eigenvectors along the horizontal axis. However, it can be seen that these eigenvectors cannot transform an orthogonal mesh into another orthogonal mesh. However, let's first try to rotate the grid 30 degrees and see what happens,
Note that the angle of the right red parallelogram at the origin has increased. (Translator Note: This implies that if we increase the angle of rotation, the angle at which the parallelogram is formed at the origin may increase to 90 degrees, thus becoming an orthogonal mesh.) Next, rotate the left grid to 60 degrees:
The grid on the right is now almost orthogonal. In fact, if the left grid is rotated by 58.28 degrees, the right and left two meshes are orthogonal.
Singular value decomposition
The geometrical essence of 2*2 matrix singular value decomposition is: For any 2*2 matrix, it is always possible to find the transformation of one orthogonal mesh to another orthogonal mesh and matrix transformation.
Use vectors to explain this phenomenon: select the appropriate orthogonal unit vectors v1 and v2, vector mv1 and mv2 are also orthogonal.
Use u1 and U2 to represent the unit vectors in the direction of mv1 and mv2 . M The lengths of the v1 and Mv2 are expressed in both σ1 and σ-quantifying the effect of the mesh being stretched in a particular direction. Σ1 and σ2 are called singular values of M . (In this case, the singular value is the golden ratio and its reciprocal, but it is not very important here.) )
Thus, we have
M v1 =σ1U1
M v2 =σ2U2
A simple description of the matrix M for vector x is now given. Since vectors v1 and v2 are orthogonal unit vectors, we have
x = (v1 x) v1 + (v2 x) v2
This means that
M x = (v1 x) Mv1 + (v2 x) Mv2
M x = (v1 x) σ1U1 + (v2 x) σ2U2
Note that the dot product can be calculated using the transpose of the vector.
v x = vTx
We have
M x = u1σ1 v1tx + u2σ2 v2tx
M = U1σ1 v1t + U2σ2 v2t
Usually expressed as
M = UΣVT
Here U is a matrix of column vectors U1 and U2 , Σ is a diagonal matrix of 0 items for σ1 and σ2,V is a column vector v1 and v2 composition of The Matrix. The Matrix v with superscript t is the transpose of the Matrix v .
The above describes how the matrix M is decomposed into the product of three matrices:v describes the orthogonal base in the primitive space,u describes the orthogonal basis of the correlation space, and Σ describes the vector in v as the U a multiple of the vector in the extrusion.
How to do singular value decomposition?
The charm of singular value decomposition is that singular values can be found in any matrix. What do you do? Let's take a look at the previous example, which adds a unit circle to the space. In the transformed space, the unit circle becomes an ellipse, and its long axis and short axis define orthogonal meshes.
Note that the long and short axes are defined with mv1 and mv2 . These two vectors thus become the longest and shortest vectors in all vectors in the unit circle.
In other words, the vector function on the unit circle | M x| There is a maximum value on the v1 and a minimum value on the v2 . This simplifies the original problem to a standard calculus problem: We optimize the extremum of a function in the unit circle. The extreme point of this function is precisely the characteristic vector of the matrix MTM . Since the matrix is symmetric, the characteristic vectors corresponding to their different eigenvalues are orthogonal. This results in the vector family vi.
Singular value by Ōi = | M VI| Get, theUI is the unit vector in the Mvi direction. But why is the UI orthogonal to each other?
To explain this problem, we assume that Ōi and σj are different singular values. We have
M VI =σiUI
M VJ =σjuj
Let's start with the expression MvimVJ , for convenience, assuming that the singular value is non-zero. On the one hand,mviVJ is zero, since the eigenvector VI as matrix MTM is orthogonal between:
M VI · M VJ = vitmt mvj = vi · M T-MVJ =λjVI VJ = 0
On the other hand, we have
M VI M VJ =σiσj UI Uj = 0
So the UI and Uj are orthogonal, so we've found the orthogonal vector set VIthat can be converted into some orthogonal vector set UI . Singular values describe multiples of stretching in different directions.
In practice, this is not the step to get the matrix singular value decomposition, because the method is not particularly efficient, or is not well-behaved in numerical calculations.
An additional example
Let's look at a singular matrix
The geometric effect of the matrix is as follows:
In this example, the second singular value is zero, so we can write this:
M = U1σ1 v1T
In other words, if some singular value is zero, the corresponding item will not appear in the decomposition of M . Therefore, the rank of the Matrix M (that is, the number of linearly independent rows or columns) equals the number of non-0 singular values.
Data compression
Singular value decomposition can represent data efficiently. For example, suppose we want to transfer the following image, including 15*25 a black or white pixel array.
Because there are only three types of columns in the image (as follows), it can be represented in a more compact form.
We use the 15*25 matrix to represent this image, where each element is not 0 i.e. 1,0 represents black pixels, and 1 represents white pixels. A total of 375 elements are shown below.
If the singular value of M is decomposed, we will only get three nonzero singular values.
σ1 = 14.72
σ2 = 5.22
Σ3 = 3.31
Therefore, the matrix can be represented as follows
M=U1σ1 v1t + U2σ2 v2 t + U3σ3 v3t
We have three vector VIwith 15 elements, three vector UIwith 25 elements, and three singular value ōi. This means that we can represent this matrix instead of the 375 elements that appear in the matrix with just 123 numbers. In this way, we see that there are 3 linearly independent columns in the matrix, which means that the rank of the matrix is 3.
Noise reduction
From the previous example we see that we have used a lot of singularity values in the matrix to be 0 specific. In general, the larger the singular value corresponding to the information the more interesting. For example, imagine that we used a scanner to enter the above image into our computer. However, our scanning opportunities create some flaws in the image (often referred to as "noise").
We deal with this in the same way: we use the 15*25 matrix to represent the image, and then we do the singular value decomposition. We get the following singular values:
σ1 = 14.15
σ2 = 4.67
σ3 = 3.00
Σ4 = 0.21
Σ5 = 0.19
...
σ15 = 0.05
Obviously, the first three singular values are the most important, so we assume that the other is the noise on the image, and assume that
m≈ U1σ1 v1t + U2σ2 v2t + U3σ3 v3t
This results in the following optimized picture
Noisy Image Improved image
Data analysis
We often encounter noise when collecting data: No matter how good the tool is, there is always some error in the measurement process. If we remember that large singular values point to important features in the matrix, it is natural to think of the singular value decomposition to study the collected data.
For example, we have collected some data as follows:
Here's the data we got, put it in the matrix:
| -1.03 |
0.74 |
-0.02 |
0.51 |
-1.31 |
0.99 |
0.69 |
-0.12 |
-0.72 |
1.11 |
| -2.23 |
1.61 |
-0.02 |
0.88 |
-2.39 |
2.02 |
1.62 |
-0.35 |
-1.67 |
2.46 |
Then the singular value decomposition is performed. We get the singular value
σ1 = 6.04
σ2 = 0.22
Where the first singular value is far greater than the other one, it is safe to assume that the small singular value σ2 is the noise in the data and is ideally considered to be 0. The rank of the matrix in this example is 1, which means that all data is on a UI -defined line.
This short example leads to the field of principal component analysis, which shows a series of techniques for detecting data dependence and redundancy using singular value decomposition.
Similarly, singular value decomposition can be used to detect clusters in the data, which explains that singular value decomposition can be used to try to optimize the Netflix movie recommendation System. The program will sort through movies you've seen that are similar to movies you've seen. The recommendation system picks up movies that are projected to be high in the collection of movies you haven't seen.
Summarize
As stated at the beginning of the article, singular value decomposition should be the core part of the linear algebra course for undergraduate mathematics majors. In addition to having an incredibly simple geometrical interpretation, singular value decomposition provides an extremely effective technique for applying linear algebra ideas to reality. However, the general lack of sufficient attention to the undergraduate course of linear algebra.
This article may have a somewhat impressionist style: My goal is to provide an intuitive explanation of the central idea behind singular value decomposition, and to illustrate how to put the concept of singular value decomposition into practice through concrete examples.
References:
- Gilbert Strang, Linear Algebraand its applications. Brooks Cole.strang ' s book was something of a classic though some may find it to be a little too formal.
- William H. Press et al, numercial Recipes in c:the Art of scientific Computing. Cambridge University press.authoritative, yet highly readable. Older versions is available online.
- Dan Kalman, a singularly valuable decomposition:the SVD of a Matrix, the College mathematics Journal (1996), 2-23.kalman ' s article, like this one, aims to improve the profile of the singular value decomposition. It also a description of how least-squares computations is facilitated by the decomposition.
- If You liked this, you ' re sureto love that, the New YorkTimes, November, 2008.This article describe S Netflix ' s prize competition as well as some of the challenges associated with it.
This article link: singular value decomposition (We recommend a Singular value decomposition)
This site article without special instructions, are original, reproduced please indicate the source: flickering, thank you! ^^
Singular value decomposition (We recommend a Singular value decomposition)