The technology of the R language data set

Source: Internet
Author: User

Key points of eigenvalue selection technique

Feature value selection technique Essentials (eigenvalue decomposition)

Wang Limin

article source:Xiahouzuoxin

A Eigen-Value decomposition

1. Characteristic value decomposition

linear algebra , the feature decomposition ( Eigendecomposition), also called spectral decomposition (spectral decomposition), is the decomposition of a matrix into its eigenvalues and eigenvectors represents the method of the product of the matrix. It is important to note that only the diagonalization matrix can be applied to the decomposition of features .

Set A has n eigenvalues and eigenvectors, then:

Write the above into a matrix form:

if (x1,x2,..., xn) reversible, the left and right sides are inverse, then the square a can be directly through the eigenvalues and eigenvectors of the unique expression, so that

q= (x1,x2,..., xn)

Σ?=?diag (λ1,?λ2,?...,? λn)

then , the expression is called the eigenvalue decomposition of the square matrix, so that the matrix A is represented by eigenvalues and eigenvectors only.

In Matlab, eigenvalue and eigenvector matrix can be obtained by Eig function.

The elements of the D diagonal are the eigenvalues (representing the scale of the scaling), and D is that each column of the q,v in the eigenvalue decomposition formula corresponds to the D column, representing the corresponding eigenvector, the σ in the eigenvalue decomposition.

1. Decomposition Method

Feature decomposition of matrices

so that a is a square of nxn , and there are n linearly independent eigenvectors

。

this way, a can be broken down into

which Q is nxn Square, and its column i is listed as a Feature vectors . Λ is a diagonal matrix whose elements on the diagonal are the corresponding eigenvalues, i.e.

. It is important to note that only a diagonalization matrix can be used for feature decomposition. Like

cannot be diagonalization of , there is no feature decomposition.

in general, feature Vectors

is generally orthogonal to the unit (but this is not required). eigenvector groups that are not orthogonal units

can also be used as The column vector of Q . This fact can be understood as follows: the length of the vector in Q is

Offset it.

The inverse of matrix is obtained by feature decomposition

if the matrix a can be decomposed by features and the eigenvalues do not contain 0, then matrix a is a non-singular matrix , and its inverse matrix Can be given by the following formula:

because Λ is a diagonal matrix , and its inverse matrix is easy to calculate:

characteristic decomposition of special matrices

symmetric matrices

any of n xn real symmetric matrices have n linearly independent eigenvectors . And these eigenvectors can be orthogonal units to obtain a set of orthogonal and modulo 1 vector. Historical facts Symmetric matrix A can be decomposed into

which Q is an orthogonal matrix , and Λ is a real diagonal matrix .

Normal matrix

Similarly, a complex normal matrix has a set of orthogonal feature Vectors base, the normal matrix can be decomposed into

which U is a unitary matrix . Further, if a is a Hermitian matrix , then the diagonal element of the diagonal matrix Λ is all real numbers. If a is a unitary matrix, then all the diagonal elements of Λ are in the complex plane made on the unit circle.

3. decomposition of eigenvalues and singular values

partially reproduced from Http://www.cnblogs.com/LeftNotEasy/archive/2011/01/19/svd-and-applicatio

Eigenvalues and singular values

Eigenvalues and singular values: in most people's impressions, they tend to stay in purely mathematical calculations. Moreover, in linear algebra or matrix theory, there is seldom any application background related to eigenvalues and singular values. Singular value decomposition is a very obvious physical meaning of a method, it can be a more complex matrix with smaller and simpler several sub-matrices of the multiplication to represent, these small matrices describe the matrix of important characteristics. It is like describing a person, to describe to others that this person is bushy, square face, beard, and with a black frame of the glasses, such a few characteristics, let others mind inside there is a more clear understanding, in fact, the characteristics of human face is an infinite variety of, the reason can be described, Because people are born with a very good ability to extract important features, so that the machine learns to extract important features,SVD is an important method.

4. Basic knowledge of singular values and eigenvalues

eigenvalue decomposition and singular value decomposition are all visible methods in the field of machine science. There is a close relationship between the two, and I'll talk about both eigenvalue decomposition and singular value decomposition for the same purpose, which is to extract the most important features of a matrix. Let's talk about eigenvalue decomposition:

(1) Characteristic value

If a vector v is a eigenvector of square A, it will certainly be represented in the following form:

At this time λ is called the eigenvalues of the Eigenvector V, and a set of eigenvectors of a matrix is a set of orthogonal vectors. Eigenvalue decomposition is the decomposition of a matrix into the following form:

where q is a matrix of the eigenvectors of this matrix A, σ is a diagonal array, and each diagonal element is a characteristic value. I have quoted some references in this article to illustrate. First of all, to be clear, a matrix is actually a linear transformation, because a matrix is multiplied by a vector, which is actually equivalent to a linear transformation of the vector. For example, one of the following matrices:

It actually corresponds to a linear transformation in the following form:

because this matrix The result of multiplying m by a vector (x, y) is:

The matrix above is symmetric, so this transformation is a stretch transform to the X, Y axis (the element on each diagonal will be stretched on a dimension, the value >1, is elongated, the value <1 is shortened), when the matrix is not symmetrical, If you say the matrix looks like this:

The transformation it describes looks like this:

This is actually a stretch transform on the plane to an axis (as shown by the Blue arrows), in the diagram, the blue arrow is one of the most important direction of change (there may be more than one direction of change), if we want to describe the good one transformation, then we describe the transformation of the main direction of change is good. Looking back at the previous eigenvalue decomposition equation, the decomposition of the σ matrix is a diagonal array, the inside of the eigenvalues are from large to small arrangement, the eigenvalues of the corresponding eigenvector is to describe the direction of the matrix change (from major changes to minor changes in the arrangement)

(2) Singular value

Here we talk about singular value decomposition. Eigenvalue decomposition is a very good way to extract the matrix features, but it is only for the square, in the real world, we see most of the matrix is not a square, for example, there are n students, each student has m science scores, so that the formation of an n * M matrix can not be a square, How can we describe the important characteristics of such a common matrix? Singular value decomposition can be used to do this thing, singular value decomposition is a method that can be applied to any matrix of decomposition:

Assumptions A is a matrix of n * m, so the resulting u is a square of n * N (the vector inside is orthogonal, the vector inside U is called the left singular vector), Σ is a matrix of n * m (except that the diagonal elements are 0, the diagonal elements are called singular values), V ' (v transpose) is an n * n Matrix, The vector inside is also orthogonal, the vector inside V is called the right singular vector, and the image reflects the size of several multiplying matrices to get the following picture

So how do singular values and eigenvalues correspond? First, we will transpose a matrix A, will get a square, we use this square to find the eigenvalues can be obtained:

The V we get here is the right singular vector above us. In addition we can also get:

Σ here is the singular value mentioned above, and U is the left singular vector mentioned above. Singular value σ is similar to the eigenvalues, in the matrix σ is also from the large to the small arrangement, and σ reduction is particularly fast, in many cases, the first 10% or even 1% of the singular value of the sum of the total singular value of more than 99%. In other words, we can also approximate the matrix with the singular value of the former R large, which defines the partial singular value decomposition:

R is a number that is much smaller than M, N, so that the multiplication of the matrix looks like this:

The result of multiplying the three matrices on the right will be a close to The matrix of A, where R is closer to N, the closer the result of the multiplication is to a. And the area of the three matrices (in the storage point of view, the smaller the size of the matrix, the less storage) is much smaller than the original matrix A, if we want to compress space to represent the original matrix A, we save the three matrix here: U, Σ, V is good.

5. Difference between eigenvalue decomposition and singular value decomposition:

A (T) = All matrices are capable of singular value decomposition, and only the square is capable of eigenvalue decomposition. When the given matrix is to a, the result of both is the same. That is to say, the eigenvalue decomposition of symmetric matrices is a special case of all singular value decomposition. However, there are still some small differences, singular value decomposition needs to order singular values from large to small, and all are greater than or equal to zero.

for feature value decomposition [V,d] = Eig (a), i.e. a = V*D*INV (v)

For singular value decomposition, the basic form of decomposition is [u,s,v] = SVD (c), C = U*s*v '. If the C array is a symmetric square, then u = V; So there is C = V*s*v ';

for feature value decomposition [V,d] = Eig (a), i.e. a = V*D*INV (v)

for singular value decomposition , the basic form of decomposition is [u,s,v] = SVD (c), C = U*s*v '. If the C array is a symmetric square, then u = V; So there is C = V*s*v ';

6. The application of eigenvalue decomposition and singular value decomposition in Digital image

at present, with the rapid development of science and technology, real life has a large number of information to be stored, processed and transmitted. While the transmission of broadband, speed and memory capacity is often limited, so data compression is very necessary, data compression technology has become the key and core technology of multimedia development, image file capacity is generally relatively large, so its storage, processing and transmission will be greatly restricted, image compression appears and it is important. At present, the algorithm of image compression has a lot of characteristics, such as JPEG and many other standards have been widely used, simply elaborated the matrix eigenvalue numerical solution theory, introduced several commonly used to solve the matrix eigenvalue method, and finally applied the eigenvalue computation to the image compression. and singular value decomposition. Singular value decomposition (SVD) is a matrix transformation method based on Eigenvector, which has been applied in signal processing, pattern recognition and digital watermarking technique. Because the image has a matrix structure, it is suggested that singular value decomposition is applied to image compression, and it is considered as an effective image compression method.

The technology of the R language data set

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.