Position: Home page » Computing » Dimension reduction and decentralization of PCA

Dimension reduction and decentralization of PCA

Publish: 2021-04-17 12:49:12
1. Look what level you're going to be... If you are a novice, you should first use the lowest level of digging, which is also the same. You go to the tool vendor to buy a stone mine hoe, and then dig by yourself. When you dig to a star on the mine hoe, you can upgrade Every upgraded tool can be upgraded only when it reaches the star level; Finished proct: Excavator T800; Raw materials: Stone 4, iron 2, hemp rope 1, stone hoe 1
2. PCA dimension rection is the best application method in comprehensive analysis and evaluation. For your problem, it is not difficult to reconstruct the original linear system matrix data when the eigenvalues and their corresponding eigenvectors are known.
3.

不用

fromsklearn.decompositionimportPCA
pca=PCA(n_components=1)
newData=pca.fit_transform(data)

可以去这里看看,有详细说明

http://doc.okbase.net/u012162613/archive/120946.html

4. K-L transform is the abbreviation of discrete transform, also known as principal component transform (PCA). It is a linear combination of a multispectral image x with K-L transformation matrix A to proce a new group of multispectral images y. The expression is:
y = ax
where x is the pixel vector of the multispectral space before transformation
y is the pixel vector of transformed Houde principal component space
A is the transformation matrix, which is the transpose matrix of the eigenvector matrix of the X-Space covariance matrix ∑ X
in the geometric sense, the transformed principal component space coordinate system is rotated by an angle compared with the original multispectral space coordinate system, and the coordinate axis of the new coordinate system must point to the direction with large amount of data information. As far as the principal components of the new bands are concerned, they contain different information and show a decreasing trend
I suggest you take a look at Chapter 10 of digital image processing and machine vision, edited by Zhang Zheng, Wang Yanping and Xue Guixiang.
5. Sort your eigenvalues from large to small. Take the corresponding first 10 eigenvectors.
6. PCA can't intervene the operation process until the result is output after the given input. The output dimension is calculated according to the proportion of the separated eigenvalues to the total eigenvalues. For example, if you set the required accuracy of 0.65, PCA will select the orthogonal eigenvalues whose eigenvalues account for more than 0.65 of the total eigenvalues, and the number of their corresponding eigenvectors is the output dimension
7.

首先2个包:

importnumpyasnp
fromsklearn.decompositionimportPCA

然后一个m x n 的矩阵,n为维度,这里设为x

n_components = 12 是自己可以设的

pca=PCA(n_components=12)
pca.fit(x)
PCA(=True,iterated_power='auto',n_components=12,random_state=None,
svd_solver='auto',tol=0.0,whiten=False)

float_formatter=lambdax:"%.2f"%x
np.set_printoptions(formatter={'float_kind':float_formatter})

print'explainedvarianceratio:'
printpca.explained_variance_ratio_
print'cumulativesum:'
printpca.explained_variance_ratio_.cumsum()
8. K-L transform is the abbreviation of discrete transform, also known as principal component transform (PCA). It is a linear combination of a multispectral image x with K-L transformation matrix A to proce a new group of multispectral images y. The expression is:
y = ax
where x is the pixel vector of the multispectral space before transformation
y is the pixel vector of transformed Houde principal component space
A is the transformation matrix, which is the transpose matrix of the eigenvector matrix of the X-Space covariance matrix ∑ X
in the geometric sense, the transformed principal component space coordinate system is rotated by an angle compared with the original multispectral space coordinate system, and the coordinate axis of the new coordinate system must point to the direction with large amount of data information. As far as the principal components of the new bands are concerned, they contain different information and show a decreasing trend
I suggest you take a look at Chapter 10 of digital image processing and machine vision, edited by Zhang Zheng, Wang Yanping and Xue Guixiang.
9. There are two ways to achieve:
transpose matrix:
b
=
A & # 39
General method: reshape() function
example is as follows:
Description: reshape (a, m, n)
means to transform matrix A into a matrix with M rows and N columns, which is usually used to change the shape of the matrix. For example, the following code transforms the original matrix with 1 row and 4 columns into a matrix with 2 rows and 2 columns:
Hot content
Inn digger Publish: 2021-05-29 20:04:36 Views: 341
Purchase of virtual currency in trust contract dispute Publish: 2021-05-29 20:04:33 Views: 942
Blockchain trust machine Publish: 2021-05-29 20:04:26 Views: 720
Brief introduction of ant mine Publish: 2021-05-29 20:04:25 Views: 848
Will digital currency open in November Publish: 2021-05-29 19:56:16 Views: 861
Global digital currency asset exchange Publish: 2021-05-29 19:54:29 Views: 603
Mining chip machine S11 Publish: 2021-05-29 19:54:26 Views: 945
Ethereum algorithm Sha3 Publish: 2021-05-29 19:52:40 Views: 643
Talking about blockchain is not reliable Publish: 2021-05-29 19:52:26 Views: 754
Mining machine node query Publish: 2021-05-29 19:36:37 Views: 750