Algorithm Principle Optimization
The Kunpeng BoostKit for Big Data algorithm library optimizes machine learning algorithm principles to reduce the algorithm complexity. The following uses the singular value decomposition (SVD) algorithm as an example to explain the optimization.
The SVD algorithm is usually used for information extraction, dimension reduction, and information preprocessing. SVD decomposes a large matrix into the product of three matrices. There are full SVD and truncated SVD. The full SVD solves all singular values S, and the truncated SVD solves the first K singular values.
The truncated SVD is usually used to solve large matrices. Optimizations made on the key nodes of the truncated SVD flowchart are as follows:
- When the difference of the initial singular values is large, the power method is used to accelerate the convergence of the randomized SVD.
- When the difference between subsequent singular values is small, the block Krylov subspace is constructed to further accelerate convergence of singular values that decay slowly and improve computing performance.
- In terms of algorithm implementation, the matrix-vector multiplication is changed to matrix-matrix multiplication, which greatly improves the computing efficiency.
In this way, the performance of the SVD algorithm is more than doubled compared with that of the open source algorithm.