Source: http://blog.csdn.net/xizhibei
==================================
PCA, that is, principalcomponents analysis, is a very good algorithm, according to the book:
Find the projection method that best represents the original data in the sense of least square.
Then I said: it is mainly used for feature dimensionality reduction.
In addition, this algorithm also has a classic application: face recognition. Here, we just need to take each line of the pr
Reference: Lle principle SummaryPersonal understandingthe defect of PCA dimensionality reduction : There are some linear relationships between samples in high dimensional space, and these relationships are not preserved after dimensionality reduction. For example, in a high-dimensional space, the shortest path is not the shortest line between two points in three-dimensional space, but the distance of the surface, and when we drop the dimension, it bec
PcaMaximize the sensitivity of individual dimensions and reduce the impact between dimensions. Differentiated measures: Variance dimension Effects: Covariance is thus represented by a matrix as the eigenvalues and eigenvectors of the covariance matrix. 1. Construct The matrix. 2. Find the covariance matrix of the Matrix. 3. Find the eigenvalues and eigenvectors of the covariance matrix, which are invariant in these directions. 4. Select a few of these directions to compare the full representatio
Principle analysis of PCA algorithm for principal component analysesDiscussion on the understanding of principal component Analysis (PCA) algorithmPrincipal component Analysis (PCA): dimensionality reduction .
Multiple variables are selected by linear transformation (linear addition) to select fewer important variables.
The principle of minimizing the loss
There is no doubt about the function that comes with MATLAB.Princomp:principal componet Analysis (PCA).[Coeff,score,latent,tsquare]=princomp (X);Parameters:%%%%%%%%%%%%%%%%%%INPUT:X is the data: N*p, where n is the number of samples and P represents the feature dimension%%%%%%%%%%%%%%%%%%OUTPUT:Coeff: Covariance p*p, projection matrixScore: The data after the projection. If the number of Samples Phenomenon: Score (:, n:p), latent (n:p) are zero. Why i
Someone asked me before. This is actually a very simple question. You can generate a simple cascade_data script.But later I found that if I did not read it carefullyCodeAnd is very prone to problems. Here is a brief introduction to help new students.
First, the positive sample used to generate PCA statistics (no matter what the negative sample is) must be consistent with the positive sample used in the training model.That is to say, the sample path a
About PCA and LDA used in face recognition and other classificationAlgorithmThere are many examples, but they areCode, Especially for C ++ code. Therefore, I can only build C ++ Based on the Matlab code. There are still some issues with the LDA algorithm. All core code will be provided in the past two weeks. In fact, PCA, Lda, and so on are just a tool. With good tools, other more and more powerful function
PcaPCA, which is called principal component analysis, is a common method of dimensionality reduction.PCA re-combines many of the original indicators with certain correlations into a new set of unrelated comprehensive indicators to replace all the original indicators. The n-dimensional features are mapped to the new orthogonal features of K-dimension.There are two general implementations of PCA: Eigenvalue decomposition and SVD.PrincipleIn order to fin
In the past two days, I checked PCA Dimensionality Reduction and tested it with opencv. Refer to [1] and [2]. According to my understanding, the code is recorded.
#include
Result:
Eigenvalues:[43.182041; 14.599923; 9.2121401; 4.0877957; 2.8236785; 0.88751495; 0.66496396]
EIGENVECTORS[0.01278889, 0.03393811,-0.099844977,-0.13044992, 0.20732452, 0.96349025,-0.020049129;0.15659945, 0.037932698, 0.12129638, 0.89324093, 0.39454412, 0.046447847, 0.06019
[1:4,1:4] = g142 x.cov[5:8,5:8] = g243 x.cov[9:10,9:10] = g344 x.cov[1:4,9:10] = g1g345 x.cov[9:10,1:4] = t(g1g3)46 x.cov[5:8,9:10] = g2g347 x.cov[9:10,5:8] = t(g2g3)48 49 50 b = spca(x.cov, 2, type=‘Gram‘, sparse=‘varnum‘, para=c(4,4), lambda=0)51 b
The results of the population version using exact covariance matrix are exactly as in the paper:
> bCall:spca(x = x.cov, K = 2, para = c(4, 4), type = "Gram", sparse = "varnum", lambda = 0)2 sparse PCs Pct. of exp. var. : 40.9 39.5 Num. of non
The following is the process of using PCA to reduce the dimension of data:The Python source code is as follows:1 fromNumPyImport*;2 defLoaddataset (filename,delim='\ t'):3 #Open File4Fr=open (fileName);5 """6 >>> line0=fr.readlines ();7 >>> Type (LINE0)8 9 >>> Line0[0]Ten ' 10.235186\t11.321997\n ' One """ AStringarr=[line.strip (). Split (Delim) forLineinchFr.readlines ()]; - #The map function acts on each element of a given sequence
Find this article on the Internet, personally feel very clear, learn.
Principle explanation of PCA algorithm
The PCA algorithm reduces the correlation between the components, but the disadvantage is that the dimensionality reduction is not conducive to classifying the data.
The first principle of the algorithm: the meaning of orthogonal basis, covariance, the purpose of diagonalization of matrices, the
PCA principal component Analysis method, LDA linear discriminant analysis method, can be considered as supervised data dimensionality reduction. The following code implements two ways to reduce the dimension, respectively:Print(__doc__)ImportMatplotlib.pyplot as Plt fromSklearnImportDatasets fromSklearn.decompositionImportPCA fromSklearn.discriminant_analysisImportLineardiscriminantanalysisiris=Datasets.load_iris () X=Iris.datay=Iris.targettarget_name
PCA, principal component analysis Principal component analysis is mainly used for dimensionality reduction of data. The dimensions of the data features in the raw data may be many, but these characteristics are not necessarily important, and if we can streamline the data features, we can reduce the storage space and possibly reduce the noise interference in the data.For example: Here is a set of data, as shown in table 1 below2.5 1.2-2.3-2.8-1 0.33.3
Many times there will be a n*m matrix as a PCA (M-dimensionality) and then get a m* (M-1) matrix such a result. Before it was mathematically deduced to get this conclusion, however,See a very vivid explanation today:Consider what PCA does. Put simply, PCA (as most typically run) creates a new coordinate system by (1) shifting the origin to the centroid of your Da
PCA (principal component analysis) is a common data dimensionality reduction method, which aims to reduce the computational amount by converting high-dimensional data to lower dimensions under the premise of less "information" loss. The "information" here refers to the useful information contained in the data.Main idea: From the original characteristics of a set of "importance" from the large to the small arrangement of new features, they are the orig
The source of this article: Http://blog.csdn.net/xizhibei=============================PCA, also known as principalcomponents analysis , is a very good algorithm, according to the book:Looking for the projection method that best represents the original data in the least mean square senseAnd then his own argument is: mainly used for features of the dimensionality reductionIn addition, the algorithm also has a classic application: human face recognition.
The source of this article: Http://blog.csdn.net/xizhibei=============================PCA, also known as principalcomponents analysis , is a very good algorithm, according to the book:Looking for the projection method that best represents the original data in the least mean square senseAnd then his own argument is: mainly used for features of the dimensionality reductionIn addition, the algorithm also has a classic application: human face recognition.
Transferred from: http://blog.csdn.net/kklots/article/details/8247738
Recently, as a result of the curriculum needs, has been studying through the face to judge gender, in the OPENCV contrib provides two methods that can be used to identify gender: Eigenface and Fisherface,eigenface mainly using PCA (principal component analysis), By eliminating the correlation in the data, the high-dimensional image is reduced to the low-dimensional space, the sample
Using PCA to reduce the dimension of high-dimensional data, there are a few features:(1) data from high-dimensional to low-dimensional, because of the variance, similar features will be merged, so the data will be reduced, the number of features will be reduced, which helps to prevent the occurrence of overfitting phenomenon. But PCA is not a good way to prevent overfitting, it is better to regularization t
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.