Cholesky decomposition

34 views
Skip to first unread message

yossibm

unread,
Oct 25, 2020, 5:15:42 PM10/25/20
to mosek

Hi,
I can't figure out how to do Cholseky decomposition:
when using LinAlg.potrf (java) with the matrix:
[3.995484573793205, -0.6213466400918929, 1.0175316894860706, -4.879746689256353E-4, 0.5617761321731574, 1.2516803200119686, 0.43886143285776424, -0.4377670250564574, 0.2902052415011747, -0.16232154309708333, -0.6213466400918929, 6.329975672632434, -0.26470891558263665, -0.5034266700616084, 1.774042131075147, -1.0565833752842824, 0.9655961876760145, 0.4606549371601706, -0.16847082281140746, -1.88939163045996, 1.0175316894860706, -0.26470891558263665, 2.9421053423558687, 0.9510938482783602, -0.4770208355956374, -0.6573879588966774, -0.3754523857027302, -0.07908254177755099, -1.3999088687334613, -0.3452166225938423, -4.8797466892558047E-4, -0.5034266700616084, 0.9510938482783602, 5.196325687237028, 0.5648868639891692, -1.16854607209379, -1.0792526086476184, 0.6653492078773319, -0.09716844565668739, -0.18143095389917777, 0.5617761321731574, 1.7740421310751473, -0.4770208355956374, 0.5648868639891691, 4.828078679270341, -0.3068443860908558, -0.7019985956650849, 2.157915088927455, 0.6690824589795098, 0.1947658499091868, 1.2516803200119686, -1.0565833752842828, -0.6573879588966774, -1.1685460720937901, -0.30684438609085585, 8.400461290767504, -1.2858421081451759, 0.8143027676726843, -0.8746434987952425, -0.6810328762877942, 0.4388614328577643, 0.9655961876760146, -0.3754523857027301, -1.0792526086476184, -0.7019985956650848, -1.285842108145176, 6.403533348266583, -0.2589694647530921, -0.3242380430388103, 0.3655559786263025, -0.43776702505645737, 0.46065493716017053, -0.07908254177755093, 0.6653492078773319, 2.157915088927455, 0.8143027676726843, -0.25896946475309196, 6.430138693872961, 0.30992827730672556, 0.940850057378238, 0.2902052415011747, -0.16847082281140743, -1.3999088687334613, -0.09716844565668728, 0.6690824589795098, -0.8746434987952425, -0.32423804303881026, 0.3099282773067257, 5.108176118382159, -0.5318382358475559, -0.1623215430970833, -1.88939163045996, -0.3452166225938423, -0.18143095389917777, 0.1947658499091869, -0.6810328762877941, 0.36555597862630274, 0.9408500573782382, -0.5318382358475559, 5.365720593421907]

n = 10, which is positive definite.

I get:

[1.9988708246890805, -0.3108488214532532, 0.5090532499239141, -2.441251645170911E-4, 0.2810467416074975, 0.6261937012396309, 0.21955467428768347, -0.2190071612679379, 0.14518459017796484, -0.08120661980362441, -0.6213466400918929, 2.496667515476091, -0.04264497059655006, -0.20166984709026117, 0.7455558931811399, -0.34523291383800064, 0.4140897788810094, 0.15724032806000154, -0.04940199818232252, -0.7668760860834992, 1.0175316894860706, -0.26470891558263665, 1.6374222233683617, 0.5756718718207573, -0.3592808105648393, -0.6051440678604171, -0.2867669395461206, 0.023884660920725772, -0.9013694097336628, -0.20555574011772831, -4.8797466892558047E-4, -0.5034266700616084, 0.9510938482783602, 2.196419084876315, 0.41983767151857193, -0.4050464955695623, -0.3781636811902007, 0.31107754111177616, 0.1874856771527419, -0.09914952265652162, 0.5617761321731574, 1.7740421310751473, -0.4770208355956374, 0.5648868639891691, 1.9717736805167976, -0.13835590177295848, -0.5156237278115079, 1.0042806302466776, 0.1331554803505451, 0.3839751845766071, 1.2516803200119686, -1.0565833752842828, -0.6573879588966774, -1.1685460720937901, -0.30684438609085585, 2.709197780248425, -0.6195255383436072, 0.47435846122457853, -0.5291999975443777, -0.37145993772466324, 0.4388614328577643, 0.9655961876760146, -0.3754523857027301, -1.0792526086476184, -0.7019985956650848, -1.285842108145176, 2.3041128400234965, 0.28653051172308364, -0.3395817182876689, 0.24840679230263374, -0.43776702505645737, 0.46065493716017053, -0.07908254177755093, 0.6653492078773319, 2.157915088927455, 0.8143027676726843, -0.25896946475309196, 2.223604068766324, 0.2371396084596981, 0.3592420531720979, 0.2902052415011747, -0.16847082281140743, -1.3999088687334613, -0.09716844565668728, 0.6690824589795098, -0.8746434987952425, -0.32423804303881026, 0.3099282773067257, 1.9410577907799647, -0.5013591842300329, -0.1623215430970833, -1.88939163045996, -0.3452166225938423, -0.18143095389917777, 0.1947658499091869, -0.6810328762877941, 0.36555597862630274, 0.9408500573782382, -0.5318382358475559, 1.997849371256658]

which is not even triangular.
what am i doing wrong?

(mosek version 9.2, java api, centos linux)

Thanks!

Michal Adamaszek

unread,
Oct 25, 2020, 5:20:50 PM10/25/20
to mosek
Only the upper of lower triangular part of the result contains the answer, depending on the uploargument, the rest should be ignored.

Reply all
Reply to author
Forward
0 new messages