Cholesky分解(Cholesky decomposition / Cholesky )
Cholesky decomposition
In linear algebra, the Cholesky decomposition or Cholesky is a decomposition of a Hermitian, positive-definite matrix into the product of a lower triangular matrix and its conjugate transpose.
Cholesky 分解是把一个对称正定的矩阵表示成一个下三角矩阵L和其转置的乘积的分解。
wiki
https://en.wikipedia.org/wiki/Cholesky_decomposition
MATLAB
https://www.mathworks.com/help/matlab/ref/chol.html?s_tid=gn_loc_drop#responsive_offcanvas
Cplusplus
https://eigen.tuxfamily.org/dox/classEigen_1_1LLT.html
#include <iostream>
#include <vector>
#include <Eigen/Dense>
using namespace std;
using namespace Eigen;
int main()
{
MatrixXd A(3,3);
A << 4,-1,2, -1,6,0, 2,0,5;
cout << "The matrix A is" << endl << A << endl;
LLT<MatrixXd> lltOfA(A); // compute the Cholesky decomposition of A
//cout << "lltofA" << endl << lltOfA(A) << endl;
MatrixXd L = lltOfA.matrixL(); // retrieve factor L in the decomposition
// The previous two lines can also be written as "L = A.llt().matrixL()"
cout << "The Cholesky factor L is" << endl << L << endl;
cout << "To check this, let us compute L * L.transpose()" << endl;
cout << L * L.transpose() << endl;
cout << "This should equal the matrix A" << endl;
}
MATLAB Cholesky分解
>> A = [4 -1 2 ; -1 6 0 ; 2 0 5 ]
A =
4 -1 2
-1 6 0
2 0 5
>> L = chol(A,'lower')
L =
2.00000 0.00000 0.00000
-0.50000 2.39792 0.00000
1.00000 0.20851 1.98910
>> B = L * L'
B =
4.0000e+00 -1.0000e+00 2.0000e+00
-1.0000e+00 6.0000e+00 -2.5602e-17
2.0000e+00 -2.5602e-17 5.0000e+00
>>
Cholesky分解(Cholesky decomposition / Cholesky )的更多相关文章
- cholesky分解
接着LU分解继续往下,就会发展出很多相关但是并不完全一样的矩阵分解,最后对于对称正定矩阵,我们则可以给出非常有用的cholesky分解.这些分解的来源就在于矩阵本身存在的特殊的 结构.对于矩阵 ...
- 矩阵分解----Cholesky分解
矩阵分解是将矩阵拆解成多个矩阵的乘积,常见的分解方法有 三角分解法.QR分解法.奇异值分解法.三角分解法是将原方阵分解成一个上三角矩阵和一个下三角矩阵,这种分解方法叫做LU分解法.进一步,如果待分解的 ...
- Cholesky分解 平方根法
一种矩阵运算方法,又叫Cholesky分解.所谓平方根法,就是利用对称正定矩阵的三角分解得到的求解对称正定方程组的一种有效方法.它是把一个对称正定的矩阵表示成一个下三角矩阵L和其转置的乘积的分解.它要 ...
- 偏置-方差分解(Bias-Variance Decomposition)
本文地址为:http://www.cnblogs.com/kemaswill/,作者联系方式为kemaswill@163.com,转载请注明出处. 机器学习的目标是学得一个泛化能力比较好的模型.所谓泛 ...
- 偏置方差分解Bias-variance Decomposition
http://blog.csdn.net/pipisorry/article/details/50638749 偏置-方差分解(Bias-Variance Decomposition) 偏置-方差分解 ...
- 偏差-方差分解Bias-Variance Decomposition
转自: http://www.cnblogs.com/jmp0xf/archive/2013/05/14/Bias-Variance_Decomposition.html
- Jordan Lecture Note-12: Kernel典型相关分析(Kernel Canonical Correlation Analysis, KCCA).
Kernel典型相关分析 (一)KCCA 同样,我们可以引入Kernel函数,通过非线性的坐标变换达到之前CCA所寻求的目标.首先,假设映射$\Phi_X: x\rightarrow \Phi_X(x ...
- 【原创】开源Math.NET基础数学类库使用(15)C#计算矩阵行列式
本博客所有文章分类的总目录:[总目录]本博客博文总目录-实时更新 开源Math.NET基础数学类库使用总目录:[目录]开源Math.NET基础数学类库使用总目录 上个月 ...
- Scipy学习笔记 矩阵计算
Scipy学习笔记 非本人原创 原链接 http://blog.sina.com.cn/s/blog_70586e000100moen.html 1.逆矩阵的求解 >>>impor ...
随机推荐
- Linq,拉姆达表达式注意!
linq的条件语句尽量不要出现计算的式子,要不然很可能,程序不能正确的将这些复杂的式子编译成表达式!! 例如: dataContext.Assets.Count(s => s.SubCatego ...
- POJ1769(线段树+DP)
飞翔 题意 : 给定一个区间长度 n ,接下来给出 m 个子区间,要求最少选出多少个区间才能使得 1~n 这个区间被所选的所有子区间覆盖 分析: 首先是动态规划,dp[i]表示把最大值从1位置搞到第i ...
- restframework 的一些操作
路飞学城项目: 1 Vue 2 restframework框架(一周) 3 学城项目(一周-两周) day98 1 CBV(class based view) 与 FBV(function based ...
- 字符串转LocalTime再转Instant
LocalTime a= LocalTime.parse("20:13:01"); // LocalTime a= LocalTime.now(); System.out.prin ...
- java线程类图
Executors创建不同类型的Executor, executor执行不同的runnable task Executor: Runnable:
- Redis未授权访问攻击过程与防范
一.Redis未授权访问攻击过程 攻击主机:kali 目标主机:centos6.8(10.104.11.178) Redis版本:2.8 攻击条件:默认配置,未进行认证 攻击步骤详解: 1.Kali攻 ...
- java——时间复杂度、动态数组
O(n)不一定小于O(n^2),要具体来看,而我们说的这种时间复杂度其实是渐进时间复杂度,描述的是n趋近于无穷的情况. 动态数组的时间复杂度: 添加操作:O(n) addLast()的均摊复杂度为O( ...
- 从零开始使用vue-cli搭建一个vue项目及注意事项
一.安装node.js 1.根据电脑的自行下载node.js安装包http://nodejs.cn 2.点击安装,按照正常的的一路点击下去 3.验证安装是否成功,按键win+r,输入cmd打开命令行工 ...
- Fortran和C的编译器PGI部署
平台信息 Description: CentOS Linux release 7.6.1810 (Core) 安装步骤 获取PGCC:社区版是免费的,自带license.dat 解压下载的压缩包:ta ...
- robot framework 的AutoItLibrary常用关键字
1.run 的用法,以及激活当前窗口