Location:
Search - k-NN with PCA
Search list
Description: 算法介绍
矩阵求逆在程序中很常见,主要应用于求Billboard矩阵。按照定义的计算方法乘法运算,严重影响了性能。在需要大量Billboard矩阵运算时,矩阵求逆的优化能极大提高性能。这里要介绍的矩阵求逆算法称为全选主元高斯-约旦法。
高斯-约旦法(全选主元)求逆的步骤如下:
首先,对于 k 从 0 到 n - 1 作如下几步:
从第 k 行、第 k 列开始的右下角子阵中选取绝对值最大的元素,并记住次元素所在的行号和列号,在通过行交换和列交换将它交换到主元素位置上。这一步称为全选主元。
m(k, k) = 1 / m(k, k)
m(k, j) = m(k, j) * m(k, k),j = 0, 1, ..., n-1;j != k
m(i, j) = m(i, j) - m(i, k) * m(k, j),i, j = 0, 1, ..., n-1;i, j != k
m(i, k) = -m(i, k) * m(k, k),i = 0, 1, ..., n-1;i != k
最后,根据在全选主元过程中所记录的行、列交换的信息进行恢复,恢复的原则如下:在全选主元过程中,先交换的行(列)后进行恢复;原来的行(列)交换用列(行)交换来恢复。-algorithm introduced in the matrix inversion process is very common, which are mainly used for Billboard matrix. In accordance with the definition of the method of calculating multiplication, seriously affecting the performance. The need for a large number of Billboard matrix operations, matrix inversion optimization can significantly improve performance. Here we introduce the matrix inversion algorithm called full-elected PCA Gauss-Jordan and France. Gauss-Jordan and France (all elected PCA) inversion of the following steps : First, for k from 0 to n-1 for the following steps : from the first trip k, k started out the bottom right corner Subarray largest absolute selected elements, and element remember meeting the line and out, the adoption OK exchange and the exchange out of its exchange
Platform: |
Size: 3072 |
Author: 刘亮 |
Hits:
Description: PCA with K-nn classifier(for pictures)
Platform: |
Size: 1024 |
Author: bumako |
Hits:
Description: 以著名的wine数据作为实验样本。包括k-NN算法,交叉验证,PCA降维等。-With the famous wine data as experimental samples.K- NN algorithm, cross validation, PCA dimension reduction, etc.
Platform: |
Size: 18432 |
Author: Zhuzhiwei |
Hits:
Description: 在机器学习中利用欧氏距离设计一个KNN分类器,实现五折交叉验证,并用PCA进行降维-Develop a k-NN classifier with Euclidean distance and simple voting.Perform 5-fold cross validation, find out which k performs the best (in terms of accuracy)。Use PCA to reduce the dimensionality to 6, then perform 2) again.
Platform: |
Size: 6144 |
Author: yuanxin |
Hits: