Python机器学习笔记:奇异值分解(SVD)算法

【自取】最近整理的,有需要可以领取学习:

完整代码及其数据,请移步小编的GitHub

传送门:请点击我

如果点击有误:https://github.com/LeBron-Jian/MachineLearningNote

奇异值分解是线性代数中一种重要的矩阵分解。它不仅可用于降维算法(如PCA算法)的特征分解,还可用于推荐系统、自然语言处理等领域。它在机器学习、信号处理、统计等领域有着重要的应用。[en]Singular value decomposition (Singular Value Decomposition, hereinafter referred to as SVD) is an important matrix decomposition in linear algebra. It can be used not only in the eigendecomposition of dimensionality reduction algorithms (such as PCA algorithm), but also in recommendation systems, natural language processing and other fields. It has important applications in machine learning, signal processing, statistics and other fields.

例如,在以往的主成分分析研究中,掌握奇异值分解的原理后很容易看到主成分分析,因为我最近一直在整理学习线性代数的基础知识,回顾了特征值和特征向量,所以这里我们也回顾一下奇异值分解算法。如果你想阅读我上一篇关于PCA降维的文章,你可以参考以下内容:[en]For example, in the previous study of PCA, it is very easy to see PCA after mastering the principle of SVD, because I have recently been sorting out the basics of learning linear algebra and reviewed eigenvalues and Eigenvectors, so here we also review the SVD algorithm. If you want to read my previous article on PCA dimensionality reduction, you can refer to the following:

好的,不用说,我们来对奇异值分解算法做一个总结(这里的主线是参考老板刘建平和他的老师的在线课程视频学习。首先,我要在这里表示感谢。)[en]All right, needless to say, let’s make a summary of SVD algorithm (the main line here is to refer to the online lesson video study of boss Liu Jianping and his teacher. First of all, I would like to express my thanks here.)

1,基变换与特征值分解

1.1 向量的表示与基变换

首先,看看向量。该向量可以表示为(3,2),它实际上表示一个线性组合:[en]First of all, look at the vector. The vector can be expressed as (3,2), which actually represents a linear combination:

Python机器学习笔记:奇异值分解(SVD)算法

Python机器学习笔记:奇异值分解(SVD)算法

基的意思是:(1,0)和(0,1)称为二维空间中的一组基。[en]Basis means: (1, 0) and (0, 1) are called a set of bases in two-dimensional space.

一组基确定表示向量的空间,而矢量表示基于用于坐标表示的这组基。如果选择的基不同,空间自然不同,那么矢量表示的坐标自然也不同。一般情况下,我们会默认传统的正交坐标系作为标准基的选择,但实际上,在选择了传统的正交坐标系后,我们仍然会得到一个经过缩放或切割变换的坐标系。[en]A set of bases determines the space in which the vector is represented, and the vector representation is based on this set of bases for coordinate representation. If the selected basis is different, the space is naturally different, then the coordinates represented by the vector are naturally different. In general, we will default to the traditional orthogonal coordinate system as the standard base selection, but in fact, after the selection of the traditional orthogonal coordinate system, we still get a coordinate system after scaling or cutting transformation.

Python机器学习笔记:奇异值分解(SVD)算法

基变换:数据与一个基做内积运算,结果作为第一个新的坐标分量,然后与第二个基做内积运算,结果作为第二个新坐标的分量。

其核心思想是用B对应的坐标系来表示A中的基,并将An下向量的坐标表示转换为关于基A的线性组合。[en]The core idea is to represent the base in A with the coordinate system corresponding to B, and to transform the coordinate representation of the vector under An into a linear combination about base A.

数据(3,2)被映射到基数中的坐标:[en]The data (3, 2) are mapped to the coordinates in the base:

Python机器学习笔记:奇异值分解(SVD)算法

Python机器学习笔记:奇异值分解(SVD)算法

1.2 特征值分解

首先,回归下的特征值和特征向量的定义如下:[en]First of all, the definitions of eigenvalues and Eigenvectors under regression are as follows:

Python机器学习笔记:奇异值分解(SVD)算法

其中,an是n×n矩阵,x是n维向量,那么我们说λ是矩阵A的特征值,x是矩阵A的特征值λ对应的特征向量。[en]Where An is an n * n matrix, x is an n-dimensional vector, then we say that λ is an eigenvalue of matrix A, and x is the eigenvector corresponding to the eigenvalue λ of matrix A.

找出特征值和特征向量有什么好处?就是我们可以把矩阵分解成一个特征值。如果我们找出矩阵A的n个特征值λ1[en]What are the advantages of finding eigenvalues and Eigenvectors? Is that we can decompose the matrix An eigenvalue. If we find out the n eigenvalues λ 1 of matrix A

Original: https://www.cnblogs.com/wj-1314/p/10304676.html
Author: 战争热诚
Title: Python机器学习笔记:奇异值分解(SVD)算法

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/5965/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

发表回复

登录后才能评论
免费咨询
免费咨询
扫码关注
扫码关注
联系站长

站长Johngo!

大数据和算法重度研究者!

持续产出大数据、算法、LeetCode干货,以及业界好资源!

2022012703491714

微信来撩,免费咨询:xiaozhu_tec

分享本页
返回顶部