ojalgo-user Mailing List for oj! Algorithms (Page 18)
Mathematics, linear algebra and optimisation
Brought to you by:
apete
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
|
Feb
(1) |
Mar
|
Apr
(14) |
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
(1) |
2005 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(3) |
Oct
|
Nov
|
Dec
(1) |
2006 |
Jan
(1) |
Feb
(1) |
Mar
(1) |
Apr
|
May
(1) |
Jun
(2) |
Jul
|
Aug
(5) |
Sep
|
Oct
(3) |
Nov
(4) |
Dec
(2) |
2007 |
Jan
(8) |
Feb
(1) |
Mar
(2) |
Apr
(11) |
May
(6) |
Jun
|
Jul
(10) |
Aug
(2) |
Sep
|
Oct
(4) |
Nov
|
Dec
(11) |
2008 |
Jan
(22) |
Feb
(4) |
Mar
(2) |
Apr
(4) |
May
(2) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(6) |
Nov
(17) |
Dec
(5) |
2009 |
Jan
(15) |
Feb
(2) |
Mar
(2) |
Apr
(3) |
May
(4) |
Jun
(5) |
Jul
(9) |
Aug
(2) |
Sep
|
Oct
(5) |
Nov
(14) |
Dec
|
2010 |
Jan
(3) |
Feb
(5) |
Mar
(2) |
Apr
(19) |
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
(5) |
Nov
(3) |
Dec
|
2011 |
Jan
|
Feb
(1) |
Mar
(7) |
Apr
(10) |
May
(1) |
Jun
(15) |
Jul
(1) |
Aug
|
Sep
|
Oct
(13) |
Nov
(9) |
Dec
(11) |
2012 |
Jan
|
Feb
(1) |
Mar
(9) |
Apr
(23) |
May
(16) |
Jun
(9) |
Jul
(13) |
Aug
|
Sep
(4) |
Oct
(1) |
Nov
(1) |
Dec
|
2013 |
Jan
|
Feb
(12) |
Mar
(7) |
Apr
(24) |
May
|
Jun
(7) |
Jul
(4) |
Aug
|
Sep
(3) |
Oct
(16) |
Nov
(7) |
Dec
(3) |
2014 |
Jan
(22) |
Feb
(1) |
Mar
(1) |
Apr
|
May
(2) |
Jun
(3) |
Jul
(4) |
Aug
(4) |
Sep
(1) |
Oct
(2) |
Nov
(6) |
Dec
(2) |
2015 |
Jan
(11) |
Feb
(10) |
Mar
(1) |
Apr
(9) |
May
|
Jun
|
Jul
(1) |
Aug
(4) |
Sep
(6) |
Oct
(3) |
Nov
(15) |
Dec
(4) |
2016 |
Jan
(6) |
Feb
|
Mar
(18) |
Apr
(5) |
May
(9) |
Jun
(3) |
Jul
(5) |
Aug
(2) |
Sep
(5) |
Oct
(2) |
Nov
|
Dec
(5) |
2017 |
Jan
(4) |
Feb
(3) |
Mar
|
Apr
|
May
(12) |
Jun
(1) |
Jul
(4) |
Aug
|
Sep
(3) |
Oct
(1) |
Nov
|
Dec
(1) |
2018 |
Jan
(5) |
Feb
|
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
|
Jul
(4) |
Aug
(1) |
Sep
(8) |
Oct
|
Nov
|
Dec
(1) |
2019 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Anders P. <an...@op...> - 2011-06-13 21:26:15
|
What org.ojalgo.optimisation.State do you get? Why don't you construct a junit test case to show me exactly what you're doing. /Anders On 13 jun 2011, at 16.21, Simon Greaves wrote: > Hi, thanks for helping! > The inequality constraints are the ones being violated. All variables are supposed to be <=1, but I get one variable with values as high as 2.4... > > SG > > > > > From: Anders Peterson <an...@op...> > To: oja...@li... > Sent: Fri, June 10, 2011 4:15:06 PM > Subject: Re: [ojAlgo-user] QuadraticSolver issue > > Which constraint is violated with negative Xi's? > > BTW > > When/if you create the various matrices manually, the way you do, there is no need to (also) use QuadraticExpressionsModel. > > Alternative 1: > > QuadraticExpressionsModel qem = new QuadraticExpressionsModel(VARIABLE); > qem.add...; > qem.add...; > OptimisationSolver qdrtc_slvr = qem.getDefaultSolver(); > > Alternative 2: > > QuadraticSolver.Builder qdrtc_slvr_bldr = new QuadraticSolver.Builder(Q_ms, C_ms).equalities(AE_ms, BE_ms).inequalities(AI_ms, BI_ms); > QuadraticSolver qdrtc_slvr = qdrtc_slvr_bldr.build(); > > /Anders > > > On 10 jun 2011, at 20.29, Simon Greaves wrote: > >> Hello! I'm using the QuadraticSolver in ojAlgo. Solving >> min 1/2 [X]T[Q][X] - [C]T[X] >> when [AE][X] == [BE] >> and [AI][X] <= [BI] >> >> I'm having a problem. Can anyone help? In the equalities I state that the sum the variables must be = 1 (by making AE a row of 1's and BE=1). And in the inequalities I state that all variables must be between 0 and 1 (by making AI an Identity Matrix and AE a column vector of 1's, which along with the equalities restriction means none can go above 1 or below 0). Still, when I run solve(), the result follows that the sum of X is 1, however, sometimes there's negative Xi's... >> >> This is how I instance the solver: >> >> QuadraticExpressionsModel qem = new QuadraticExpressionsModel(VARIABLE); >> QuadraticSolver.Builder qdrtc_slvr_bldr = new QuadraticSolver.Builder(qem).objective(Q_ms, C_ms).equalities(AE_ms, BE_ms).inequalities(AI_ms, BI_ms); >> QuadraticSolver qdrtc_slvr = qdrtc_slvr_bldr.build(); >> >> when I call "qdrtc_slvr_bldr.getAI()" I get the matrix I inserted, so it seem like the object has all the matrices in place. Am I doing something wrong? >> >> >> >> Thanks in advance for any help! >> >> >> >> SG >> >> ------------------------------------------------------------------------------ >> EditLive Enterprise is the world's most technically advanced content >> authoring tool. Experience the power of Track Changes, Inline Image >> Editing and ensure content is compliant with Accessibility Checking. >> http://p.sf.net/sfu/ephox-dev2dev_______________________________________________ >> ojAlgo-user mailing list >> ojA...@li... >> https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > > ------------------------------------------------------------------------------ > EditLive Enterprise is the world's most technically advanced content > authoring tool. Experience the power of Track Changes, Inline Image > Editing and ensure content is compliant with Accessibility Checking. > http://p.sf.net/sfu/ephox-dev2dev > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > ------------------------------------------------------------------------------ > EditLive Enterprise is the world's most technically advanced content > authoring tool. Experience the power of Track Changes, Inline Image > Editing and ensure content is compliant with Accessibility Checking. > http://p.sf.net/sfu/ephox-dev2dev_______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: Simon G. <si...@ya...> - 2011-06-13 17:04:40
|
Hi, thanks for helping! The inequality constraints are the ones being violated. All variables are supposed to be <=1, but I get one variable with values as high as 2.4... SG ________________________________ From: Anders Peterson <an...@op...> To: oja...@li... Sent: Fri, June 10, 2011 4:15:06 PM Subject: Re: [ojAlgo-user] QuadraticSolver issue Which constraint is violated with negative Xi's? BTW When/if you create the various matrices manually, the way you do, there is no need to (also) use QuadraticExpressionsModel. Alternative 1: QuadraticExpressionsModel qem = new QuadraticExpressionsModel(VARIABLE); qem.add...; qem.add...; OptimisationSolver qdrtc_slvr = qem.getDefaultSolver(); Alternative 2: QuadraticSolver.Builder qdrtc_slvr_bldr = new QuadraticSolver.Builder(Q_ms, C_ms).equalities(AE_ms, BE_ms).inequalities(AI_ms, BI_ms); QuadraticSolver qdrtc_slvr = qdrtc_slvr_bldr.build(); /Anders On 10 jun 2011, at 20.29, Simon Greaves wrote: > Hello! I'm using the QuadraticSolver in ojAlgo. Solving > min 1/2 [X]T[Q][X] - [C]T[X] > when [AE][X] == [BE] > and [AI][X] <= [BI] > > I'm having a problem. Can anyone help? In the equalities I state that the sum >the variables must be = 1 (by making AE a row of 1's and BE=1). And in the >inequalities I state that all variables must be between 0 and 1 (by making AI an >Identity Matrix and AE a column vector of 1's, which along with the equalities >restriction means none can go above 1 or below 0). Still, when I run solve(), >the result follows that the sum of X is 1, however, sometimes there's negative >Xi's... > > This is how I instance the solver: > > QuadraticExpressionsModel qem = new QuadraticExpressionsModel(VARIABLE); > QuadraticSolver.Builder qdrtc_slvr_bldr = new >QuadraticSolver.Builder(qem).objective(Q_ms, C_ms).equalities(AE_ms, >BE_ms).inequalities(AI_ms, BI_ms); > QuadraticSolver qdrtc_slvr = qdrtc_slvr_bldr.build(); > > when I call "qdrtc_slvr_bldr.getAI()" I get the matrix I inserted, so it seem >like the object has all the matrices in place. Am I doing something wrong? > > > > Thanks in advance for any help! > > > > SG > > ------------------------------------------------------------------------------ > EditLive Enterprise is the world's most technically advanced content > authoring tool. Experience the power of Track Changes, Inline Image > Editing and ensure content is compliant with Accessibility Checking. > http://p.sf.net/sfu/ephox-dev2dev_______________________________________________ > > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user ------------------------------------------------------------------------------ EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev _______________________________________________ ojAlgo-user mailing list ojA...@li... https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: Anders P. <an...@op...> - 2011-06-10 20:45:15
|
Which constraint is violated with negative Xi's? BTW When/if you create the various matrices manually, the way you do, there is no need to (also) use QuadraticExpressionsModel. Alternative 1: QuadraticExpressionsModel qem = new QuadraticExpressionsModel(VARIABLE); qem.add...; qem.add...; OptimisationSolver qdrtc_slvr = qem.getDefaultSolver(); Alternative 2: QuadraticSolver.Builder qdrtc_slvr_bldr = new QuadraticSolver.Builder(Q_ms, C_ms).equalities(AE_ms, BE_ms).inequalities(AI_ms, BI_ms); QuadraticSolver qdrtc_slvr = qdrtc_slvr_bldr.build(); /Anders On 10 jun 2011, at 20.29, Simon Greaves wrote: > Hello! I'm using the QuadraticSolver in ojAlgo. Solving > min 1/2 [X]T[Q][X] - [C]T[X] > when [AE][X] == [BE] > and [AI][X] <= [BI] > > I'm having a problem. Can anyone help? In the equalities I state that the sum the variables must be = 1 (by making AE a row of 1's and BE=1). And in the inequalities I state that all variables must be between 0 and 1 (by making AI an Identity Matrix and AE a column vector of 1's, which along with the equalities restriction means none can go above 1 or below 0). Still, when I run solve(), the result follows that the sum of X is 1, however, sometimes there's negative Xi's... > > This is how I instance the solver: > > QuadraticExpressionsModel qem = new QuadraticExpressionsModel(VARIABLE); > QuadraticSolver.Builder qdrtc_slvr_bldr = new QuadraticSolver.Builder(qem).objective(Q_ms, C_ms).equalities(AE_ms, BE_ms).inequalities(AI_ms, BI_ms); > QuadraticSolver qdrtc_slvr = qdrtc_slvr_bldr.build(); > > when I call "qdrtc_slvr_bldr.getAI()" I get the matrix I inserted, so it seem like the object has all the matrices in place. Am I doing something wrong? > > > > Thanks in advance for any help! > > > > SG > > ------------------------------------------------------------------------------ > EditLive Enterprise is the world's most technically advanced content > authoring tool. Experience the power of Track Changes, Inline Image > Editing and ensure content is compliant with Accessibility Checking. > http://p.sf.net/sfu/ephox-dev2dev_______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: Simon G. <si...@ya...> - 2011-06-10 18:29:25
|
Hello! I'm using the QuadraticSolver in ojAlgo. Solvingmin 1/2 [X]T[Q][X] - [C]T[X] when [AE][X] == [BE] and [AI][X] <= [BI] I'm having a problem. Can anyone help? In the equalities I state that the sum the variables must be = 1 (by making AE a row of 1's and BE=1). And in the inequalities I state that all variables must be between 0 and 1 (by making AI an Identity Matrix and AE a column vector of 1's, which along with the equalities restriction means none can go above 1 or below 0). Still, when I run solve(), the result follows that the sum of X is 1, however, sometimes there's negative Xi's... This is how I instance the solver: QuadraticExpressionsModel qem = new QuadraticExpressionsModel(VARIABLE); QuadraticSolver.Builder qdrtc_slvr_bldr = new QuadraticSolver.Builder(qem).objective(Q_ms, C_ms).equalities(AE_ms, BE_ms).inequalities(AI_ms, BI_ms); QuadraticSolver qdrtc_slvr = qdrtc_slvr_bldr.build(); when I call "qdrtc_slvr_bldr.getAI()" I get the matrix I inserted, so it seem like the object has all the matrices in place. Am I doing something wrong? Thanks in advance for any help! SG |
From: Anders P. <an...@op...> - 2011-05-17 19:54:08
|
Just released snapshot 29.59. http://ojalgo.org/change_log.html http://sourceforge.net/projects/ojalgo/files/ v30 will (probably) be released in about a month. /Anders |
From: Anders P. <an...@op...> - 2011-04-18 19:35:00
|
Just released snapshot 29.53. http://ojalgo.org/change_log.html http://sourceforge.net/projects/ojalgo/files/ There will most likely be another snapshot release in about a month and then finally v30 mid June. /Anders |
From: Chris F. <cf...@co...> - 2011-04-07 05:31:24
|
Hi Anders, Excellent. I think this gives us the info we need. I hope to try this out within the week. Thanks so much, -Chris On Tue, 2011-04-05 at 20:55 +0200, Anders Peterson wrote: > The class CholeskyDecomposition has three static factory methods: makeBig(), makeComplex(), makePrimitive() and makeJama(). You should use one of those, and not worry about which subclass is actually returned. > > The pattern is the same for the other matrix decompositions: EigenvalueDecomposition, BidiagonalDecomposition, HessenbergDecomposition, LUDecomposition, QRDecomposition, SchurDecomposition, TridiagonalDecomposition and SingularValueDecomposition. > > Don't think there is anything wrong with your matrices. It's just that JAMA wont allow even the smallest difference between transposed elements - they have to be EXACTLY the same. The "native" ojAlgo Cholesky decomposition wont check for symmetry unless you specify that, and when/if it does check it allows for small differences. I guess Parallel does something similar. > > /Anders > > > On 5 apr 2011, at 07.49, Chris Forden wrote: > > > Hi Anders, > > > >> Switch to using ojAlgo's own/native Cholesky decomposition and the > > problem should go away. > > > > According to http://ojalgo.org/generated/index.html, > > CholeskyDecomposition is abstract, and no derived class is listed. (The > > generated Javadocs do not list any "All Known Implementing Classes:" > > section for CholeskyDecomposition. Should I be generating my own > > Javadocs from the source, to overcome such missing refs to derived > > classes?) > > > > > > > >> if the matrix does not pass as being symmetric you will get that > > exception if you call solve(). ... I haven't actually looked at the code > > you sent me yet, but I'm sure this is the problem. > > > > I have added a symmetry test: > > > > private void printSymmetry(JamaMatrix in) { > > JamaMatrix diff = in.subtract(in.transpose()); > > double assymNormRatio = diff.getFrobeniusNorm().doubleValue() > > / in.getFrobeniusNorm().doubleValue(); > > System.out.println(diff.toString()); > > System.out.println(); > > System.out.println("assymNormRatio= " + assymNormRatio); > > } > > > > All the values of diff are small (0 or less than 1e-20), and > > assymNormRatio = 5.3710432377270805E-17 > > I would think that such small assymetries should be deemed > > insignificant, right? > > > > I then tested Positive Definiteness by printing the Eigen values with > > this code: > > > > private void printEigens(JamaMatrix in) { > > JamaEigenvalue eigMat = new JamaEigenvalue(); > > eigMat.compute(in); > > Array1D<ComplexNumber> eigVals = eigMat.getEigenvalues(); > > System.out.println(); > > System.out.println("eigen Vals= " + eigVals); > > double minEigValR =99999.9; > > for (ComplexNumber c : eigVals) { > > if (minEigValR > c.getReal()) > > minEigValR = c.getReal(); > > } > > System.out.println("min eigVal real = " + minEigValR); > > } > > > > > > The output was: > > > > eigen Vals= [(4.498282249210615E-4 + 0.0i), (1.5887605890203683E-4 + > > 0.0i), (1.1332549725716817E-4 + 0.0i), (1.0609982549417765E-4 + 0.0i), > > (5.2699055744352376E-5 + 0.0i), (4.8733492649113855E-5 + 0.0i), > > (4.2166615429069484E-5 + 0.0i), (3.8203524668310696E-5 + 0.0i), > > (3.629597352711602E-5 + 0.0i), (2.6518439788904983E-5 + 0.0i), > > (1.5907235051737824E-5 + 0.0i), (1.2258822768511711E-5 + 0.0i), > > (1.1744258961933221E-5 + 0.0i), (1.0690845009451796E-5 + 0.0i), > > (8.786473150043942E-6 + 0.0i), (5.600551936654057E-6 + 0.0i), > > (4.221645596951178E-6 + 0.0i), (4.109779674404523E-6 + 0.0i)] > > min eigVal real = 4.109779674404523E-6 > > > > The fact that all Eigenvalues have real parts greater than zero, means > > the matrix is positive definite, right? > > > > Thanks for your help, > > --Chris > > > > > > On Mon, 2011-04-04 at 22:05 +0200, Anders Peterson wrote: > >> "java.lang.RuntimeException: Matrix is not symmetric positive definite" is a message to you - not (necessarily) a bug. > >> > >> You've chosen to use the JAMA Cholesky decomposition (part of ojAlgo). JAMA checks for symmetry using A[k][j] == A[j][k] and if the matrix does not pass as being symmetric you will get that exception if you call solve(). I have no plans to change JAMA's behavior in this respect. > >> > >> I haven't actually looked at the code you sent me yet, but I'm sure this is the problem. Switch to using ojAlgo's own/native Cholesky decomposition and the problem should go away. > >> > >> /Anders > >> > >> > >> On 4 apr 2011, at 05.52, Chris Forden wrote: > >> > >>> Hi Anders, > >>> > >>> I eventually did find a case in which ojAlgo's latest snapshot (29.45) > >>> failed to calculate an inverse, although it successfully decomposed the > >>> input matrix. I have attached a small Eclipse project in zipped format, > >>> which I created by extracting 3 files from our project. I added some > >>> statements in CovarianceWeighter.calcInverse(JamaMatrix), declaring > >>> convenient local vars for debugging. The code requires ojAlgo 29.45, > >>> and if you want for comparison, Parallel Colt 0.9.4. > >>> > >>> You can reproduce the problem by debugging > >>> TestCovarianceWeighter.testSelectRefStations() as a Junit test; an > >>> exception gets thrown: > >>> > >>> java.lang.RuntimeException: Matrix is not symmetric positive definite. > >>> at > >>> org.ojalgo.matrix.jama.CholeskyDecomposition.solve(CholeskyDecomposition.java:163) > >>> at org.ojalgo.matrix.jama.JamaCholesky.solve(JamaCholesky.java:223) > >>> at > >>> org.ojalgo.matrix.jama.JamaAbstractDecomposition.solve(JamaAbstractDecomposition.java:63) > >>> at org.ojalgo.matrix.jama.JamaCholesky.solve(JamaCholesky.java:1) > >>> at org.ojalgo.matrix.jama.JamaCholesky.getInverse(JamaCholesky.java:90) > >>> at > >>> gov.usgs.dismodel.calc.inversion.CovarianceWeighter.calcInverse(CovarianceWeighter.java:212) > >>> at > >>> gov.usgs.dismodel.calc.inversion.CovarianceWeighter.calcRefSubtractedInverse(CovarianceWeighter.java:424) > >>> at > >>> gov.usgs.dismodel.calc.inversion.CovarianceWeighter.selectReferenceStation(CovarianceWeighter.java:401) > >>> at > >>> gov.usgs.dismodel.calc.inversion.TestCovarianceWeighter.testSelectRefStations(TestCovarianceWeighter.java:275) > >>> > >>> Parallel Colt performed the decomposition and the inversion without > >>> throwing any exceptions. OjAlgo (since v28) succeeds in decomposing the > >>> input matrix into an L matrix, but throws a non SPD exception when > >>> getInverse() is then called. I suspect that the problem might be a > >>> tolerance for SPDness; if so, some public API for adjusting the > >>> tolerance, might be all that is required and should be mentioned in the > >>> Javadocs for JamaCholesky. > >>> > >>> The problem described above did not force us to replace ojAlgo with P. > >>> Colt, however. Instead I merely used a general matrix inversion, > >>> supplied by ojAlgo, in CovarianceWeighter.calcInverse(JamaMatrix). > >>> However, a different matrix, in the attached file “Inverted covar matrix > >>> that fails oj Cholesky compute.txt”, caused JamaCholesky.compute() to > >>> return false, and did not yield L and R matrices that, when multiplied, > >>> reconstituted the original input matrix. For that calculation, we went > >>> to Parallel Colt which succeeds in decomposing the input. I have tried > >>> ojAlgo v28 and v29.45 with this matrix file. I have not ruled out the > >>> possibility that in either of these submitted examples, that the inputs > >>> were really not SPD, although they looked symmetric and can be > >>> decomposed and reconstituted (L*L') by P. Colt. > >>> > >>> Below is some code I used on “Inverted covar matrix that fails oj > >>> Cholesky compute.txt”, adapted from > >>> http://code.google.com/p/dismodel/source/browse/ehz_gps/trunk/modeling/dismodel/src/main/java/gov/usgs/dismodel/calc/inversion/CovarianceWeighter.java > >>> > >>> > >>> /** > >>> * Calculate what our MATLAB scripts call the W matrix, for solving our > >>> systems > >>> * of linear equations. This weights equations by the inverse of the > >>> data > >>> * covariance matrix. > >>> */ > >>> protected void calcWeighterMatrix(){ > >>> try { > >>> JamaCholesky cholTemp = new JamaCholesky(); > >>> if (cholTemp.compute(invcov)){ > >>> weighterMatrix = cholTemp.getR(); > >>> } > >>> else { > >>> JamaMatrix R = cholTemp.getR(); > >>> JamaMatrix L = cholTemp.getL(); > >>> JamaMatrix RT =R.transpose(); > >>> JamaMatrix product = L.multiplyRight((BasicMatrix)R); > >>> > >>> /* Parallel Colt's Cholesky Decomposition: */ > >>> DenseDoubleMatrix2D in = new > >>> DenseDoubleMatrix2D(ArrayUtils.toRawCopyOf(invcov)); > >>> DenseDoubleCholeskyDecomposition coltCho = new > >>> DenseDoubleCholeskyDecomposition(in); > >>> DoubleMatrix2D cL = coltCho.getL(); > >>> DoubleMatrix2D cLt = coltCho.getLtranspose(); > >>> DoubleMatrix2D cReconstituted = new > >>> DenseDoubleMatrix2D(in.rows(), in.rows()); > >>> cL.zMult(cLt, cReconstituted); > >>> > >>> int dummy = 4; // Set breakpoint here; > >>> } > >>> } catch (Exception e) { > >>> e.printStackTrace(); > >>> } > >>> } > >>> > >>> > >>> Thanks, > >>> --Chris > >>> > >>> On Fri, 2011-04-01 at 09:31 +0200, Anders Peterson wrote: > >>>> Did you encounter any problems switching from v29 to v30? > >>>> > >>>> Is the bug still there or not? > >>>> > >>>> /Anders > >>>> > >>>> > >>>> On 28 mar 2011, at 22.25, Chris Forden wrote: > >>>> > >>>>> Hi, > >>>>> > >>>>> Thanks! I will try the recent snapshot. > >>>>> > >>>>> --Chris > >>>>> > >>>>> > >>> > >>> <Inverted covar matrix that fails oj Cholesky compute.txt><CholeskyBugDemo.zip>------------------------------------------------------------------------------ > >>> Create and publish websites with WebMatrix > >>> Use the most popular FREE web apps or write code yourself; > >>> WebMatrix provides all the features you need to develop and > >>> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf > >>> _______________________________________________ > >>> ojAlgo-user mailing list > >>> ojA...@li... > >>> https://lists.sourceforge.net/lists/listinfo/ojalgo-user > >> > >> > >> ------------------------------------------------------------------------------ > >> Xperia(TM) PLAY > >> It's a major breakthrough. An authentic gaming > >> smartphone on the nation's most reliable network. > >> And it wants your games. > >> http://p.sf.net/sfu/verizon-sfdev > >> _______________________________________________ > >> ojAlgo-user mailing list > >> ojA...@li... > >> https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > > > > > > > ------------------------------------------------------------------------------ > > Xperia(TM) PLAY > > It's a major breakthrough. An authentic gaming > > smartphone on the nation's most reliable network. > > And it wants your games. > > http://p.sf.net/sfu/verizon-sfdev > > _______________________________________________ > > ojAlgo-user mailing list > > ojA...@li... > > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > > ------------------------------------------------------------------------------ > Xperia(TM) PLAY > It's a major breakthrough. An authentic gaming > smartphone on the nation's most reliable network. > And it wants your games. > http://p.sf.net/sfu/verizon-sfdev > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: Anders P. <an...@op...> - 2011-04-05 18:56:08
|
The class CholeskyDecomposition has three static factory methods: makeBig(), makeComplex(), makePrimitive() and makeJama(). You should use one of those, and not worry about which subclass is actually returned. The pattern is the same for the other matrix decompositions: EigenvalueDecomposition, BidiagonalDecomposition, HessenbergDecomposition, LUDecomposition, QRDecomposition, SchurDecomposition, TridiagonalDecomposition and SingularValueDecomposition. Don't think there is anything wrong with your matrices. It's just that JAMA wont allow even the smallest difference between transposed elements - they have to be EXACTLY the same. The "native" ojAlgo Cholesky decomposition wont check for symmetry unless you specify that, and when/if it does check it allows for small differences. I guess Parallel does something similar. /Anders On 5 apr 2011, at 07.49, Chris Forden wrote: > Hi Anders, > >> Switch to using ojAlgo's own/native Cholesky decomposition and the > problem should go away. > > According to http://ojalgo.org/generated/index.html, > CholeskyDecomposition is abstract, and no derived class is listed. (The > generated Javadocs do not list any "All Known Implementing Classes:" > section for CholeskyDecomposition. Should I be generating my own > Javadocs from the source, to overcome such missing refs to derived > classes?) > > > >> if the matrix does not pass as being symmetric you will get that > exception if you call solve(). ... I haven't actually looked at the code > you sent me yet, but I'm sure this is the problem. > > I have added a symmetry test: > > private void printSymmetry(JamaMatrix in) { > JamaMatrix diff = in.subtract(in.transpose()); > double assymNormRatio = diff.getFrobeniusNorm().doubleValue() > / in.getFrobeniusNorm().doubleValue(); > System.out.println(diff.toString()); > System.out.println(); > System.out.println("assymNormRatio= " + assymNormRatio); > } > > All the values of diff are small (0 or less than 1e-20), and > assymNormRatio = 5.3710432377270805E-17 > I would think that such small assymetries should be deemed > insignificant, right? > > I then tested Positive Definiteness by printing the Eigen values with > this code: > > private void printEigens(JamaMatrix in) { > JamaEigenvalue eigMat = new JamaEigenvalue(); > eigMat.compute(in); > Array1D<ComplexNumber> eigVals = eigMat.getEigenvalues(); > System.out.println(); > System.out.println("eigen Vals= " + eigVals); > double minEigValR =99999.9; > for (ComplexNumber c : eigVals) { > if (minEigValR > c.getReal()) > minEigValR = c.getReal(); > } > System.out.println("min eigVal real = " + minEigValR); > } > > > The output was: > > eigen Vals= [(4.498282249210615E-4 + 0.0i), (1.5887605890203683E-4 + > 0.0i), (1.1332549725716817E-4 + 0.0i), (1.0609982549417765E-4 + 0.0i), > (5.2699055744352376E-5 + 0.0i), (4.8733492649113855E-5 + 0.0i), > (4.2166615429069484E-5 + 0.0i), (3.8203524668310696E-5 + 0.0i), > (3.629597352711602E-5 + 0.0i), (2.6518439788904983E-5 + 0.0i), > (1.5907235051737824E-5 + 0.0i), (1.2258822768511711E-5 + 0.0i), > (1.1744258961933221E-5 + 0.0i), (1.0690845009451796E-5 + 0.0i), > (8.786473150043942E-6 + 0.0i), (5.600551936654057E-6 + 0.0i), > (4.221645596951178E-6 + 0.0i), (4.109779674404523E-6 + 0.0i)] > min eigVal real = 4.109779674404523E-6 > > The fact that all Eigenvalues have real parts greater than zero, means > the matrix is positive definite, right? > > Thanks for your help, > --Chris > > > On Mon, 2011-04-04 at 22:05 +0200, Anders Peterson wrote: >> "java.lang.RuntimeException: Matrix is not symmetric positive definite" is a message to you - not (necessarily) a bug. >> >> You've chosen to use the JAMA Cholesky decomposition (part of ojAlgo). JAMA checks for symmetry using A[k][j] == A[j][k] and if the matrix does not pass as being symmetric you will get that exception if you call solve(). I have no plans to change JAMA's behavior in this respect. >> >> I haven't actually looked at the code you sent me yet, but I'm sure this is the problem. Switch to using ojAlgo's own/native Cholesky decomposition and the problem should go away. >> >> /Anders >> >> >> On 4 apr 2011, at 05.52, Chris Forden wrote: >> >>> Hi Anders, >>> >>> I eventually did find a case in which ojAlgo's latest snapshot (29.45) >>> failed to calculate an inverse, although it successfully decomposed the >>> input matrix. I have attached a small Eclipse project in zipped format, >>> which I created by extracting 3 files from our project. I added some >>> statements in CovarianceWeighter.calcInverse(JamaMatrix), declaring >>> convenient local vars for debugging. The code requires ojAlgo 29.45, >>> and if you want for comparison, Parallel Colt 0.9.4. >>> >>> You can reproduce the problem by debugging >>> TestCovarianceWeighter.testSelectRefStations() as a Junit test; an >>> exception gets thrown: >>> >>> java.lang.RuntimeException: Matrix is not symmetric positive definite. >>> at >>> org.ojalgo.matrix.jama.CholeskyDecomposition.solve(CholeskyDecomposition.java:163) >>> at org.ojalgo.matrix.jama.JamaCholesky.solve(JamaCholesky.java:223) >>> at >>> org.ojalgo.matrix.jama.JamaAbstractDecomposition.solve(JamaAbstractDecomposition.java:63) >>> at org.ojalgo.matrix.jama.JamaCholesky.solve(JamaCholesky.java:1) >>> at org.ojalgo.matrix.jama.JamaCholesky.getInverse(JamaCholesky.java:90) >>> at >>> gov.usgs.dismodel.calc.inversion.CovarianceWeighter.calcInverse(CovarianceWeighter.java:212) >>> at >>> gov.usgs.dismodel.calc.inversion.CovarianceWeighter.calcRefSubtractedInverse(CovarianceWeighter.java:424) >>> at >>> gov.usgs.dismodel.calc.inversion.CovarianceWeighter.selectReferenceStation(CovarianceWeighter.java:401) >>> at >>> gov.usgs.dismodel.calc.inversion.TestCovarianceWeighter.testSelectRefStations(TestCovarianceWeighter.java:275) >>> >>> Parallel Colt performed the decomposition and the inversion without >>> throwing any exceptions. OjAlgo (since v28) succeeds in decomposing the >>> input matrix into an L matrix, but throws a non SPD exception when >>> getInverse() is then called. I suspect that the problem might be a >>> tolerance for SPDness; if so, some public API for adjusting the >>> tolerance, might be all that is required and should be mentioned in the >>> Javadocs for JamaCholesky. >>> >>> The problem described above did not force us to replace ojAlgo with P. >>> Colt, however. Instead I merely used a general matrix inversion, >>> supplied by ojAlgo, in CovarianceWeighter.calcInverse(JamaMatrix). >>> However, a different matrix, in the attached file “Inverted covar matrix >>> that fails oj Cholesky compute.txt”, caused JamaCholesky.compute() to >>> return false, and did not yield L and R matrices that, when multiplied, >>> reconstituted the original input matrix. For that calculation, we went >>> to Parallel Colt which succeeds in decomposing the input. I have tried >>> ojAlgo v28 and v29.45 with this matrix file. I have not ruled out the >>> possibility that in either of these submitted examples, that the inputs >>> were really not SPD, although they looked symmetric and can be >>> decomposed and reconstituted (L*L') by P. Colt. >>> >>> Below is some code I used on “Inverted covar matrix that fails oj >>> Cholesky compute.txt”, adapted from >>> http://code.google.com/p/dismodel/source/browse/ehz_gps/trunk/modeling/dismodel/src/main/java/gov/usgs/dismodel/calc/inversion/CovarianceWeighter.java >>> >>> >>> /** >>> * Calculate what our MATLAB scripts call the W matrix, for solving our >>> systems >>> * of linear equations. This weights equations by the inverse of the >>> data >>> * covariance matrix. >>> */ >>> protected void calcWeighterMatrix(){ >>> try { >>> JamaCholesky cholTemp = new JamaCholesky(); >>> if (cholTemp.compute(invcov)){ >>> weighterMatrix = cholTemp.getR(); >>> } >>> else { >>> JamaMatrix R = cholTemp.getR(); >>> JamaMatrix L = cholTemp.getL(); >>> JamaMatrix RT =R.transpose(); >>> JamaMatrix product = L.multiplyRight((BasicMatrix)R); >>> >>> /* Parallel Colt's Cholesky Decomposition: */ >>> DenseDoubleMatrix2D in = new >>> DenseDoubleMatrix2D(ArrayUtils.toRawCopyOf(invcov)); >>> DenseDoubleCholeskyDecomposition coltCho = new >>> DenseDoubleCholeskyDecomposition(in); >>> DoubleMatrix2D cL = coltCho.getL(); >>> DoubleMatrix2D cLt = coltCho.getLtranspose(); >>> DoubleMatrix2D cReconstituted = new >>> DenseDoubleMatrix2D(in.rows(), in.rows()); >>> cL.zMult(cLt, cReconstituted); >>> >>> int dummy = 4; // Set breakpoint here; >>> } >>> } catch (Exception e) { >>> e.printStackTrace(); >>> } >>> } >>> >>> >>> Thanks, >>> --Chris >>> >>> On Fri, 2011-04-01 at 09:31 +0200, Anders Peterson wrote: >>>> Did you encounter any problems switching from v29 to v30? >>>> >>>> Is the bug still there or not? >>>> >>>> /Anders >>>> >>>> >>>> On 28 mar 2011, at 22.25, Chris Forden wrote: >>>> >>>>> Hi, >>>>> >>>>> Thanks! I will try the recent snapshot. >>>>> >>>>> --Chris >>>>> >>>>> >>> >>> <Inverted covar matrix that fails oj Cholesky compute.txt><CholeskyBugDemo.zip>------------------------------------------------------------------------------ >>> Create and publish websites with WebMatrix >>> Use the most popular FREE web apps or write code yourself; >>> WebMatrix provides all the features you need to develop and >>> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf >>> _______________________________________________ >>> ojAlgo-user mailing list >>> ojA...@li... >>> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >> >> >> ------------------------------------------------------------------------------ >> Xperia(TM) PLAY >> It's a major breakthrough. An authentic gaming >> smartphone on the nation's most reliable network. >> And it wants your games. >> http://p.sf.net/sfu/verizon-sfdev >> _______________________________________________ >> ojAlgo-user mailing list >> ojA...@li... >> https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > > > ------------------------------------------------------------------------------ > Xperia(TM) PLAY > It's a major breakthrough. An authentic gaming > smartphone on the nation's most reliable network. > And it wants your games. > http://p.sf.net/sfu/verizon-sfdev > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: Chris F. <cf...@co...> - 2011-04-05 05:49:11
|
Hi Anders, > Switch to using ojAlgo's own/native Cholesky decomposition and the problem should go away. According to http://ojalgo.org/generated/index.html, CholeskyDecomposition is abstract, and no derived class is listed. (The generated Javadocs do not list any "All Known Implementing Classes:" section for CholeskyDecomposition. Should I be generating my own Javadocs from the source, to overcome such missing refs to derived classes?) > if the matrix does not pass as being symmetric you will get that exception if you call solve(). ... I haven't actually looked at the code you sent me yet, but I'm sure this is the problem. I have added a symmetry test: private void printSymmetry(JamaMatrix in) { JamaMatrix diff = in.subtract(in.transpose()); double assymNormRatio = diff.getFrobeniusNorm().doubleValue() / in.getFrobeniusNorm().doubleValue(); System.out.println(diff.toString()); System.out.println(); System.out.println("assymNormRatio= " + assymNormRatio); } All the values of diff are small (0 or less than 1e-20), and assymNormRatio = 5.3710432377270805E-17 I would think that such small assymetries should be deemed insignificant, right? I then tested Positive Definiteness by printing the Eigen values with this code: private void printEigens(JamaMatrix in) { JamaEigenvalue eigMat = new JamaEigenvalue(); eigMat.compute(in); Array1D<ComplexNumber> eigVals = eigMat.getEigenvalues(); System.out.println(); System.out.println("eigen Vals= " + eigVals); double minEigValR =99999.9; for (ComplexNumber c : eigVals) { if (minEigValR > c.getReal()) minEigValR = c.getReal(); } System.out.println("min eigVal real = " + minEigValR); } The output was: eigen Vals= [(4.498282249210615E-4 + 0.0i), (1.5887605890203683E-4 + 0.0i), (1.1332549725716817E-4 + 0.0i), (1.0609982549417765E-4 + 0.0i), (5.2699055744352376E-5 + 0.0i), (4.8733492649113855E-5 + 0.0i), (4.2166615429069484E-5 + 0.0i), (3.8203524668310696E-5 + 0.0i), (3.629597352711602E-5 + 0.0i), (2.6518439788904983E-5 + 0.0i), (1.5907235051737824E-5 + 0.0i), (1.2258822768511711E-5 + 0.0i), (1.1744258961933221E-5 + 0.0i), (1.0690845009451796E-5 + 0.0i), (8.786473150043942E-6 + 0.0i), (5.600551936654057E-6 + 0.0i), (4.221645596951178E-6 + 0.0i), (4.109779674404523E-6 + 0.0i)] min eigVal real = 4.109779674404523E-6 The fact that all Eigenvalues have real parts greater than zero, means the matrix is positive definite, right? Thanks for your help, --Chris On Mon, 2011-04-04 at 22:05 +0200, Anders Peterson wrote: > "java.lang.RuntimeException: Matrix is not symmetric positive definite" is a message to you - not (necessarily) a bug. > > You've chosen to use the JAMA Cholesky decomposition (part of ojAlgo). JAMA checks for symmetry using A[k][j] == A[j][k] and if the matrix does not pass as being symmetric you will get that exception if you call solve(). I have no plans to change JAMA's behavior in this respect. > > I haven't actually looked at the code you sent me yet, but I'm sure this is the problem. Switch to using ojAlgo's own/native Cholesky decomposition and the problem should go away. > > /Anders > > > On 4 apr 2011, at 05.52, Chris Forden wrote: > > > Hi Anders, > > > > I eventually did find a case in which ojAlgo's latest snapshot (29.45) > > failed to calculate an inverse, although it successfully decomposed the > > input matrix. I have attached a small Eclipse project in zipped format, > > which I created by extracting 3 files from our project. I added some > > statements in CovarianceWeighter.calcInverse(JamaMatrix), declaring > > convenient local vars for debugging. The code requires ojAlgo 29.45, > > and if you want for comparison, Parallel Colt 0.9.4. > > > > You can reproduce the problem by debugging > > TestCovarianceWeighter.testSelectRefStations() as a Junit test; an > > exception gets thrown: > > > > java.lang.RuntimeException: Matrix is not symmetric positive definite. > > at > > org.ojalgo.matrix.jama.CholeskyDecomposition.solve(CholeskyDecomposition.java:163) > > at org.ojalgo.matrix.jama.JamaCholesky.solve(JamaCholesky.java:223) > > at > > org.ojalgo.matrix.jama.JamaAbstractDecomposition.solve(JamaAbstractDecomposition.java:63) > > at org.ojalgo.matrix.jama.JamaCholesky.solve(JamaCholesky.java:1) > > at org.ojalgo.matrix.jama.JamaCholesky.getInverse(JamaCholesky.java:90) > > at > > gov.usgs.dismodel.calc.inversion.CovarianceWeighter.calcInverse(CovarianceWeighter.java:212) > > at > > gov.usgs.dismodel.calc.inversion.CovarianceWeighter.calcRefSubtractedInverse(CovarianceWeighter.java:424) > > at > > gov.usgs.dismodel.calc.inversion.CovarianceWeighter.selectReferenceStation(CovarianceWeighter.java:401) > > at > > gov.usgs.dismodel.calc.inversion.TestCovarianceWeighter.testSelectRefStations(TestCovarianceWeighter.java:275) > > > > Parallel Colt performed the decomposition and the inversion without > > throwing any exceptions. OjAlgo (since v28) succeeds in decomposing the > > input matrix into an L matrix, but throws a non SPD exception when > > getInverse() is then called. I suspect that the problem might be a > > tolerance for SPDness; if so, some public API for adjusting the > > tolerance, might be all that is required and should be mentioned in the > > Javadocs for JamaCholesky. > > > > The problem described above did not force us to replace ojAlgo with P. > > Colt, however. Instead I merely used a general matrix inversion, > > supplied by ojAlgo, in CovarianceWeighter.calcInverse(JamaMatrix). > > However, a different matrix, in the attached file “Inverted covar matrix > > that fails oj Cholesky compute.txt”, caused JamaCholesky.compute() to > > return false, and did not yield L and R matrices that, when multiplied, > > reconstituted the original input matrix. For that calculation, we went > > to Parallel Colt which succeeds in decomposing the input. I have tried > > ojAlgo v28 and v29.45 with this matrix file. I have not ruled out the > > possibility that in either of these submitted examples, that the inputs > > were really not SPD, although they looked symmetric and can be > > decomposed and reconstituted (L*L') by P. Colt. > > > > Below is some code I used on “Inverted covar matrix that fails oj > > Cholesky compute.txt”, adapted from > > http://code.google.com/p/dismodel/source/browse/ehz_gps/trunk/modeling/dismodel/src/main/java/gov/usgs/dismodel/calc/inversion/CovarianceWeighter.java > > > > > > /** > > * Calculate what our MATLAB scripts call the W matrix, for solving our > > systems > > * of linear equations. This weights equations by the inverse of the > > data > > * covariance matrix. > > */ > > protected void calcWeighterMatrix(){ > > try { > > JamaCholesky cholTemp = new JamaCholesky(); > > if (cholTemp.compute(invcov)){ > > weighterMatrix = cholTemp.getR(); > > } > > else { > > JamaMatrix R = cholTemp.getR(); > > JamaMatrix L = cholTemp.getL(); > > JamaMatrix RT =R.transpose(); > > JamaMatrix product = L.multiplyRight((BasicMatrix)R); > > > > /* Parallel Colt's Cholesky Decomposition: */ > > DenseDoubleMatrix2D in = new > > DenseDoubleMatrix2D(ArrayUtils.toRawCopyOf(invcov)); > > DenseDoubleCholeskyDecomposition coltCho = new > > DenseDoubleCholeskyDecomposition(in); > > DoubleMatrix2D cL = coltCho.getL(); > > DoubleMatrix2D cLt = coltCho.getLtranspose(); > > DoubleMatrix2D cReconstituted = new > > DenseDoubleMatrix2D(in.rows(), in.rows()); > > cL.zMult(cLt, cReconstituted); > > > > int dummy = 4; // Set breakpoint here; > > } > > } catch (Exception e) { > > e.printStackTrace(); > > } > > } > > > > > > Thanks, > > --Chris > > > > On Fri, 2011-04-01 at 09:31 +0200, Anders Peterson wrote: > >> Did you encounter any problems switching from v29 to v30? > >> > >> Is the bug still there or not? > >> > >> /Anders > >> > >> > >> On 28 mar 2011, at 22.25, Chris Forden wrote: > >> > >>> Hi, > >>> > >>> Thanks! I will try the recent snapshot. > >>> > >>> --Chris > >>> > >>> > > > > <Inverted covar matrix that fails oj Cholesky compute.txt><CholeskyBugDemo.zip>------------------------------------------------------------------------------ > > Create and publish websites with WebMatrix > > Use the most popular FREE web apps or write code yourself; > > WebMatrix provides all the features you need to develop and > > publish your website. http://p.sf.net/sfu/ms-webmatrix-sf > > _______________________________________________ > > ojAlgo-user mailing list > > ojA...@li... > > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > > ------------------------------------------------------------------------------ > Xperia(TM) PLAY > It's a major breakthrough. An authentic gaming > smartphone on the nation's most reliable network. > And it wants your games. > http://p.sf.net/sfu/verizon-sfdev > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: Anders P. <an...@op...> - 2011-04-04 20:58:53
|
I ran the "Java Matrix Benchmark" http://ojalgo.org/performance_ejml.html ojAlgo performs ok considering I didn't write the benchmark ;-) /Anders |
From: Anders P. <an...@op...> - 2011-04-04 20:05:20
|
"java.lang.RuntimeException: Matrix is not symmetric positive definite" is a message to you - not (necessarily) a bug. You've chosen to use the JAMA Cholesky decomposition (part of ojAlgo). JAMA checks for symmetry using A[k][j] == A[j][k] and if the matrix does not pass as being symmetric you will get that exception if you call solve(). I have no plans to change JAMA's behavior in this respect. I haven't actually looked at the code you sent me yet, but I'm sure this is the problem. Switch to using ojAlgo's own/native Cholesky decomposition and the problem should go away. /Anders On 4 apr 2011, at 05.52, Chris Forden wrote: > Hi Anders, > > I eventually did find a case in which ojAlgo's latest snapshot (29.45) > failed to calculate an inverse, although it successfully decomposed the > input matrix. I have attached a small Eclipse project in zipped format, > which I created by extracting 3 files from our project. I added some > statements in CovarianceWeighter.calcInverse(JamaMatrix), declaring > convenient local vars for debugging. The code requires ojAlgo 29.45, > and if you want for comparison, Parallel Colt 0.9.4. > > You can reproduce the problem by debugging > TestCovarianceWeighter.testSelectRefStations() as a Junit test; an > exception gets thrown: > > java.lang.RuntimeException: Matrix is not symmetric positive definite. > at > org.ojalgo.matrix.jama.CholeskyDecomposition.solve(CholeskyDecomposition.java:163) > at org.ojalgo.matrix.jama.JamaCholesky.solve(JamaCholesky.java:223) > at > org.ojalgo.matrix.jama.JamaAbstractDecomposition.solve(JamaAbstractDecomposition.java:63) > at org.ojalgo.matrix.jama.JamaCholesky.solve(JamaCholesky.java:1) > at org.ojalgo.matrix.jama.JamaCholesky.getInverse(JamaCholesky.java:90) > at > gov.usgs.dismodel.calc.inversion.CovarianceWeighter.calcInverse(CovarianceWeighter.java:212) > at > gov.usgs.dismodel.calc.inversion.CovarianceWeighter.calcRefSubtractedInverse(CovarianceWeighter.java:424) > at > gov.usgs.dismodel.calc.inversion.CovarianceWeighter.selectReferenceStation(CovarianceWeighter.java:401) > at > gov.usgs.dismodel.calc.inversion.TestCovarianceWeighter.testSelectRefStations(TestCovarianceWeighter.java:275) > > Parallel Colt performed the decomposition and the inversion without > throwing any exceptions. OjAlgo (since v28) succeeds in decomposing the > input matrix into an L matrix, but throws a non SPD exception when > getInverse() is then called. I suspect that the problem might be a > tolerance for SPDness; if so, some public API for adjusting the > tolerance, might be all that is required and should be mentioned in the > Javadocs for JamaCholesky. > > The problem described above did not force us to replace ojAlgo with P. > Colt, however. Instead I merely used a general matrix inversion, > supplied by ojAlgo, in CovarianceWeighter.calcInverse(JamaMatrix). > However, a different matrix, in the attached file “Inverted covar matrix > that fails oj Cholesky compute.txt”, caused JamaCholesky.compute() to > return false, and did not yield L and R matrices that, when multiplied, > reconstituted the original input matrix. For that calculation, we went > to Parallel Colt which succeeds in decomposing the input. I have tried > ojAlgo v28 and v29.45 with this matrix file. I have not ruled out the > possibility that in either of these submitted examples, that the inputs > were really not SPD, although they looked symmetric and can be > decomposed and reconstituted (L*L') by P. Colt. > > Below is some code I used on “Inverted covar matrix that fails oj > Cholesky compute.txt”, adapted from > http://code.google.com/p/dismodel/source/browse/ehz_gps/trunk/modeling/dismodel/src/main/java/gov/usgs/dismodel/calc/inversion/CovarianceWeighter.java > > > /** > * Calculate what our MATLAB scripts call the W matrix, for solving our > systems > * of linear equations. This weights equations by the inverse of the > data > * covariance matrix. > */ > protected void calcWeighterMatrix(){ > try { > JamaCholesky cholTemp = new JamaCholesky(); > if (cholTemp.compute(invcov)){ > weighterMatrix = cholTemp.getR(); > } > else { > JamaMatrix R = cholTemp.getR(); > JamaMatrix L = cholTemp.getL(); > JamaMatrix RT =R.transpose(); > JamaMatrix product = L.multiplyRight((BasicMatrix)R); > > /* Parallel Colt's Cholesky Decomposition: */ > DenseDoubleMatrix2D in = new > DenseDoubleMatrix2D(ArrayUtils.toRawCopyOf(invcov)); > DenseDoubleCholeskyDecomposition coltCho = new > DenseDoubleCholeskyDecomposition(in); > DoubleMatrix2D cL = coltCho.getL(); > DoubleMatrix2D cLt = coltCho.getLtranspose(); > DoubleMatrix2D cReconstituted = new > DenseDoubleMatrix2D(in.rows(), in.rows()); > cL.zMult(cLt, cReconstituted); > > int dummy = 4; // Set breakpoint here; > } > } catch (Exception e) { > e.printStackTrace(); > } > } > > > Thanks, > --Chris > > On Fri, 2011-04-01 at 09:31 +0200, Anders Peterson wrote: >> Did you encounter any problems switching from v29 to v30? >> >> Is the bug still there or not? >> >> /Anders >> >> >> On 28 mar 2011, at 22.25, Chris Forden wrote: >> >>> Hi, >>> >>> Thanks! I will try the recent snapshot. >>> >>> --Chris >>> >>> > > <Inverted covar matrix that fails oj Cholesky compute.txt><CholeskyBugDemo.zip>------------------------------------------------------------------------------ > Create and publish websites with WebMatrix > Use the most popular FREE web apps or write code yourself; > WebMatrix provides all the features you need to develop and > publish your website. http://p.sf.net/sfu/ms-webmatrix-sf > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: Chris F. <cf...@co...> - 2011-04-04 03:52:43
|
Hi Anders, I eventually did find a case in which ojAlgo's latest snapshot (29.45) failed to calculate an inverse, although it successfully decomposed the input matrix. I have attached a small Eclipse project in zipped format, which I created by extracting 3 files from our project. I added some statements in CovarianceWeighter.calcInverse(JamaMatrix), declaring convenient local vars for debugging. The code requires ojAlgo 29.45, and if you want for comparison, Parallel Colt 0.9.4. You can reproduce the problem by debugging TestCovarianceWeighter.testSelectRefStations() as a Junit test; an exception gets thrown: java.lang.RuntimeException: Matrix is not symmetric positive definite. at org.ojalgo.matrix.jama.CholeskyDecomposition.solve(CholeskyDecomposition.java:163) at org.ojalgo.matrix.jama.JamaCholesky.solve(JamaCholesky.java:223) at org.ojalgo.matrix.jama.JamaAbstractDecomposition.solve(JamaAbstractDecomposition.java:63) at org.ojalgo.matrix.jama.JamaCholesky.solve(JamaCholesky.java:1) at org.ojalgo.matrix.jama.JamaCholesky.getInverse(JamaCholesky.java:90) at gov.usgs.dismodel.calc.inversion.CovarianceWeighter.calcInverse(CovarianceWeighter.java:212) at gov.usgs.dismodel.calc.inversion.CovarianceWeighter.calcRefSubtractedInverse(CovarianceWeighter.java:424) at gov.usgs.dismodel.calc.inversion.CovarianceWeighter.selectReferenceStation(CovarianceWeighter.java:401) at gov.usgs.dismodel.calc.inversion.TestCovarianceWeighter.testSelectRefStations(TestCovarianceWeighter.java:275) Parallel Colt performed the decomposition and the inversion without throwing any exceptions. OjAlgo (since v28) succeeds in decomposing the input matrix into an L matrix, but throws a non SPD exception when getInverse() is then called. I suspect that the problem might be a tolerance for SPDness; if so, some public API for adjusting the tolerance, might be all that is required and should be mentioned in the Javadocs for JamaCholesky. The problem described above did not force us to replace ojAlgo with P. Colt, however. Instead I merely used a general matrix inversion, supplied by ojAlgo, in CovarianceWeighter.calcInverse(JamaMatrix). However, a different matrix, in the attached file “Inverted covar matrix that fails oj Cholesky compute.txt”, caused JamaCholesky.compute() to return false, and did not yield L and R matrices that, when multiplied, reconstituted the original input matrix. For that calculation, we went to Parallel Colt which succeeds in decomposing the input. I have tried ojAlgo v28 and v29.45 with this matrix file. I have not ruled out the possibility that in either of these submitted examples, that the inputs were really not SPD, although they looked symmetric and can be decomposed and reconstituted (L*L') by P. Colt. Below is some code I used on “Inverted covar matrix that fails oj Cholesky compute.txt”, adapted from http://code.google.com/p/dismodel/source/browse/ehz_gps/trunk/modeling/dismodel/src/main/java/gov/usgs/dismodel/calc/inversion/CovarianceWeighter.java /** * Calculate what our MATLAB scripts call the W matrix, for solving our systems * of linear equations. This weights equations by the inverse of the data * covariance matrix. */ protected void calcWeighterMatrix(){ try { JamaCholesky cholTemp = new JamaCholesky(); if (cholTemp.compute(invcov)){ weighterMatrix = cholTemp.getR(); } else { JamaMatrix R = cholTemp.getR(); JamaMatrix L = cholTemp.getL(); JamaMatrix RT =R.transpose(); JamaMatrix product = L.multiplyRight((BasicMatrix)R); /* Parallel Colt's Cholesky Decomposition: */ DenseDoubleMatrix2D in = new DenseDoubleMatrix2D(ArrayUtils.toRawCopyOf(invcov)); DenseDoubleCholeskyDecomposition coltCho = new DenseDoubleCholeskyDecomposition(in); DoubleMatrix2D cL = coltCho.getL(); DoubleMatrix2D cLt = coltCho.getLtranspose(); DoubleMatrix2D cReconstituted = new DenseDoubleMatrix2D(in.rows(), in.rows()); cL.zMult(cLt, cReconstituted); int dummy = 4; // Set breakpoint here; } } catch (Exception e) { e.printStackTrace(); } } Thanks, --Chris On Fri, 2011-04-01 at 09:31 +0200, Anders Peterson wrote: > Did you encounter any problems switching from v29 to v30? > > Is the bug still there or not? > > /Anders > > > On 28 mar 2011, at 22.25, Chris Forden wrote: > > > Hi, > > > > Thanks! I will try the recent snapshot. > > > > --Chris > > > > |
From: Chris F. <cf...@co...> - 2011-04-02 00:51:32
|
Hi Anders, For better or worse, I cannot reproduce the bug even in version 28, which is where I first noticed it. I have not yet tried 29 or any snapshot of 30 recently. Perhaps I am not just remembering the steps-to-reproduce correctly. Or perhaps the JVM has changed. I went back to our code just before swapping out ojAlgo that still has some comments about the problem: cho = new JamaCholesky(); cho.compute(in); invcov = null; // in case the inverse (below) throws invcov = cho.getInverse(); However, I cannot get the exception to throw (unless in is diagonal with some zeroes on the diagonal, in which case it should throw). I have tried 32-bit Linux and 64-bit Vista, both running 32-bit JVMs and Eclipse. My colleague recently mentioned he had some troubles, and I now see that the code he mentioned also uses Cholesky matrices. I will ask him if he still has the trouble. Sorry for the bother (but in September, there really was a problem). :) --Chris -----Original Message----- From: Anders Peterson [mailto:an...@op...] Sent: Friday, April 01, 2011 12:32 AM To: ojAlgo ojAlgo Subject: Re: [ojAlgo-user] Cholesky decomp broken for many matrices in versions 28 and 29 Did you encounter any problems switching from v29 to v30? Is the bug still there or not? /Anders On 28 mar 2011, at 22.25, Chris Forden wrote: > Hi, > > Thanks! I will try the recent snapshot. > > --Chris > > > > On Mon, 2011-03-28 at 22:21 +0200, Anders Peterson wrote: >> Sounds like you don't use any of the snapshot releases. There has been at least one bug fix related to solving equation systems and inverting matrices using the Cholesky and LU decompositions. Please, try the latest snapshot release. If the bug is still there I will need some sort of test case that demonstrates the problem. >> >> It's been very long since v29 was released. Too long. A lot of things have changed with v30. The change log is probably not complete... >> >> /Anders >> >> >> On 28 mar 2011, at 18.44, Chris Forden wrote: >> >>> Hi, >>> >>> Thanks for the wonderful software which our the main math workhorse lib >>> in http://code.google.com/p/dismodel/ ! >>> >>> We found that there was a bad bug in your Cholesky decomposition >>> whenever we used it to try to solve some matrices which had been >>> processed by what we call differencing out our reference-station data >>> form our covariance matrices. I understand that probably is not >>> meaningful to you, but we solved our problem quickly by adding all the >>> Parallel Colt libs to our project just for Cholesky decomp. That was an >>> inelegant solution but worked well. The problem occurred in modest >>> sized matrices (such as 18 x 18). >>> >>> I wonder if your recent (version 30, unreleased) work on your Cholesky >>> algorithm is likely to fix that bug. Is it necessary for us to write a >>> bug report? The current status of our project makes it not very easy to >>> extract example matrices to send you for analysis and testing, although >>> I might be able to do so if necessary. >>> >>> Thanks so much again for ojAlgo! >>> >>> --Chris Forden >>> >>> >>> ---------------------------------------------------------------------------- -- >>> Create and publish websites with WebMatrix >>> Use the most popular FREE web apps or write code yourself; >>> WebMatrix provides all the features you need to develop and publish >>> your website. http://p.sf.net/sfu/ms-webmatrix-sf >>> _______________________________________________ >>> ojAlgo-user mailing list >>> ojA...@li... >>> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >>> >>> >> >> >> ---------------------------------------------------------------------------- -- >> Create and publish websites with WebMatrix >> Use the most popular FREE web apps or write code yourself; >> WebMatrix provides all the features you need to develop and publish >> your website. http://p.sf.net/sfu/ms-webmatrix-sf >> _______________________________________________ >> ojAlgo-user mailing list >> ojA...@li... >> https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > > > ---------------------------------------------------------------------------- -- > Create and publish websites with WebMatrix > Use the most popular FREE web apps or write code yourself; > WebMatrix provides all the features you need to develop and publish > your website. http://p.sf.net/sfu/ms-webmatrix-sf > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > ---------------------------------------------------------------------------- -- Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf _______________________________________________ ojAlgo-user mailing list ojA...@li... https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: Chris F. <cf...@co...> - 2011-04-01 15:48:21
|
Hi Anders, I will try testing v30 in the next day or two. Meanwhile a colleague has reported other problems, unrelated to Cholesky decomp, but I do not know the details. --Chris -----Original Message----- From: Anders Peterson [mailto:an...@op...] Sent: Friday, April 01, 2011 12:32 AM To: ojAlgo ojAlgo Subject: Re: [ojAlgo-user] Cholesky decomp broken for many matrices in versions 28 and 29 Did you encounter any problems switching from v29 to v30? Is the bug still there or not? /Anders On 28 mar 2011, at 22.25, Chris Forden wrote: > Hi, > > Thanks! I will try the recent snapshot. > > --Chris > > > > On Mon, 2011-03-28 at 22:21 +0200, Anders Peterson wrote: >> Sounds like you don't use any of the snapshot releases. There has been at least one bug fix related to solving equation systems and inverting matrices using the Cholesky and LU decompositions. Please, try the latest snapshot release. If the bug is still there I will need some sort of test case that demonstrates the problem. >> >> It's been very long since v29 was released. Too long. A lot of things have changed with v30. The change log is probably not complete... >> >> /Anders >> >> >> On 28 mar 2011, at 18.44, Chris Forden wrote: >> >>> Hi, >>> >>> Thanks for the wonderful software which our the main math workhorse lib >>> in http://code.google.com/p/dismodel/ ! >>> >>> We found that there was a bad bug in your Cholesky decomposition >>> whenever we used it to try to solve some matrices which had been >>> processed by what we call differencing out our reference-station data >>> form our covariance matrices. I understand that probably is not >>> meaningful to you, but we solved our problem quickly by adding all the >>> Parallel Colt libs to our project just for Cholesky decomp. That was an >>> inelegant solution but worked well. The problem occurred in modest >>> sized matrices (such as 18 x 18). >>> >>> I wonder if your recent (version 30, unreleased) work on your Cholesky >>> algorithm is likely to fix that bug. Is it necessary for us to write a >>> bug report? The current status of our project makes it not very easy to >>> extract example matrices to send you for analysis and testing, although >>> I might be able to do so if necessary. >>> >>> Thanks so much again for ojAlgo! >>> >>> --Chris Forden >>> >>> >>> ---------------------------------------------------------------------------- -- >>> Create and publish websites with WebMatrix >>> Use the most popular FREE web apps or write code yourself; >>> WebMatrix provides all the features you need to develop and publish >>> your website. http://p.sf.net/sfu/ms-webmatrix-sf >>> _______________________________________________ >>> ojAlgo-user mailing list >>> ojA...@li... >>> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >>> >>> >> >> >> ---------------------------------------------------------------------------- -- >> Create and publish websites with WebMatrix >> Use the most popular FREE web apps or write code yourself; >> WebMatrix provides all the features you need to develop and publish >> your website. http://p.sf.net/sfu/ms-webmatrix-sf >> _______________________________________________ >> ojAlgo-user mailing list >> ojA...@li... >> https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > > > ---------------------------------------------------------------------------- -- > Create and publish websites with WebMatrix > Use the most popular FREE web apps or write code yourself; > WebMatrix provides all the features you need to develop and publish > your website. http://p.sf.net/sfu/ms-webmatrix-sf > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > ---------------------------------------------------------------------------- -- Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf _______________________________________________ ojAlgo-user mailing list ojA...@li... https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: Anders P. <an...@op...> - 2011-04-01 07:32:06
|
Did you encounter any problems switching from v29 to v30? Is the bug still there or not? /Anders On 28 mar 2011, at 22.25, Chris Forden wrote: > Hi, > > Thanks! I will try the recent snapshot. > > --Chris > > > > On Mon, 2011-03-28 at 22:21 +0200, Anders Peterson wrote: >> Sounds like you don't use any of the snapshot releases. There has been at least one bug fix related to solving equation systems and inverting matrices using the Cholesky and LU decompositions. Please, try the latest snapshot release. If the bug is still there I will need some sort of test case that demonstrates the problem. >> >> It's been very long since v29 was released. Too long. A lot of things have changed with v30. The change log is probably not complete... >> >> /Anders >> >> >> On 28 mar 2011, at 18.44, Chris Forden wrote: >> >>> Hi, >>> >>> Thanks for the wonderful software which our the main math workhorse lib >>> in http://code.google.com/p/dismodel/ ! >>> >>> We found that there was a bad bug in your Cholesky decomposition >>> whenever we used it to try to solve some matrices which had been >>> processed by what we call differencing out our reference-station data >>> form our covariance matrices. I understand that probably is not >>> meaningful to you, but we solved our problem quickly by adding all the >>> Parallel Colt libs to our project just for Cholesky decomp. That was an >>> inelegant solution but worked well. The problem occurred in modest >>> sized matrices (such as 18 x 18). >>> >>> I wonder if your recent (version 30, unreleased) work on your Cholesky >>> algorithm is likely to fix that bug. Is it necessary for us to write a >>> bug report? The current status of our project makes it not very easy to >>> extract example matrices to send you for analysis and testing, although >>> I might be able to do so if necessary. >>> >>> Thanks so much again for ojAlgo! >>> >>> --Chris Forden >>> >>> >>> ------------------------------------------------------------------------------ >>> Create and publish websites with WebMatrix >>> Use the most popular FREE web apps or write code yourself; >>> WebMatrix provides all the features you need to develop and publish >>> your website. http://p.sf.net/sfu/ms-webmatrix-sf >>> _______________________________________________ >>> ojAlgo-user mailing list >>> ojA...@li... >>> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >>> >>> >> >> >> ------------------------------------------------------------------------------ >> Create and publish websites with WebMatrix >> Use the most popular FREE web apps or write code yourself; >> WebMatrix provides all the features you need to develop and publish >> your website. http://p.sf.net/sfu/ms-webmatrix-sf >> _______________________________________________ >> ojAlgo-user mailing list >> ojA...@li... >> https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > > > ------------------------------------------------------------------------------ > Create and publish websites with WebMatrix > Use the most popular FREE web apps or write code yourself; > WebMatrix provides all the features you need to develop and publish > your website. http://p.sf.net/sfu/ms-webmatrix-sf > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > |
From: Chris F. <cf...@co...> - 2011-03-28 20:25:47
|
Hi, Thanks! I will try the recent snapshot. --Chris On Mon, 2011-03-28 at 22:21 +0200, Anders Peterson wrote: > Sounds like you don't use any of the snapshot releases. There has been at least one bug fix related to solving equation systems and inverting matrices using the Cholesky and LU decompositions. Please, try the latest snapshot release. If the bug is still there I will need some sort of test case that demonstrates the problem. > > It's been very long since v29 was released. Too long. A lot of things have changed with v30. The change log is probably not complete... > > /Anders > > > On 28 mar 2011, at 18.44, Chris Forden wrote: > > > Hi, > > > > Thanks for the wonderful software which our the main math workhorse lib > > in http://code.google.com/p/dismodel/ ! > > > > We found that there was a bad bug in your Cholesky decomposition > > whenever we used it to try to solve some matrices which had been > > processed by what we call differencing out our reference-station data > > form our covariance matrices. I understand that probably is not > > meaningful to you, but we solved our problem quickly by adding all the > > Parallel Colt libs to our project just for Cholesky decomp. That was an > > inelegant solution but worked well. The problem occurred in modest > > sized matrices (such as 18 x 18). > > > > I wonder if your recent (version 30, unreleased) work on your Cholesky > > algorithm is likely to fix that bug. Is it necessary for us to write a > > bug report? The current status of our project makes it not very easy to > > extract example matrices to send you for analysis and testing, although > > I might be able to do so if necessary. > > > > Thanks so much again for ojAlgo! > > > > --Chris Forden > > > > > > ------------------------------------------------------------------------------ > > Create and publish websites with WebMatrix > > Use the most popular FREE web apps or write code yourself; > > WebMatrix provides all the features you need to develop and publish > > your website. http://p.sf.net/sfu/ms-webmatrix-sf > > _______________________________________________ > > ojAlgo-user mailing list > > ojA...@li... > > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > > > > > > ------------------------------------------------------------------------------ > Create and publish websites with WebMatrix > Use the most popular FREE web apps or write code yourself; > WebMatrix provides all the features you need to develop and publish > your website. http://p.sf.net/sfu/ms-webmatrix-sf > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: Anders P. <an...@op...> - 2011-03-28 20:22:09
|
Sounds like you don't use any of the snapshot releases. There has been at least one bug fix related to solving equation systems and inverting matrices using the Cholesky and LU decompositions. Please, try the latest snapshot release. If the bug is still there I will need some sort of test case that demonstrates the problem. It's been very long since v29 was released. Too long. A lot of things have changed with v30. The change log is probably not complete... /Anders On 28 mar 2011, at 18.44, Chris Forden wrote: > Hi, > > Thanks for the wonderful software which our the main math workhorse lib > in http://code.google.com/p/dismodel/ ! > > We found that there was a bad bug in your Cholesky decomposition > whenever we used it to try to solve some matrices which had been > processed by what we call differencing out our reference-station data > form our covariance matrices. I understand that probably is not > meaningful to you, but we solved our problem quickly by adding all the > Parallel Colt libs to our project just for Cholesky decomp. That was an > inelegant solution but worked well. The problem occurred in modest > sized matrices (such as 18 x 18). > > I wonder if your recent (version 30, unreleased) work on your Cholesky > algorithm is likely to fix that bug. Is it necessary for us to write a > bug report? The current status of our project makes it not very easy to > extract example matrices to send you for analysis and testing, although > I might be able to do so if necessary. > > Thanks so much again for ojAlgo! > > --Chris Forden > > > ------------------------------------------------------------------------------ > Create and publish websites with WebMatrix > Use the most popular FREE web apps or write code yourself; > WebMatrix provides all the features you need to develop and publish > your website. http://p.sf.net/sfu/ms-webmatrix-sf > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > |
From: Chris F. <cf...@co...> - 2011-03-28 16:44:53
|
Hi, Thanks for the wonderful software which our the main math workhorse lib in http://code.google.com/p/dismodel/ ! We found that there was a bad bug in your Cholesky decomposition whenever we used it to try to solve some matrices which had been processed by what we call differencing out our reference-station data form our covariance matrices. I understand that probably is not meaningful to you, but we solved our problem quickly by adding all the Parallel Colt libs to our project just for Cholesky decomp. That was an inelegant solution but worked well. The problem occurred in modest sized matrices (such as 18 x 18). I wonder if your recent (version 30, unreleased) work on your Cholesky algorithm is likely to fix that bug. Is it necessary for us to write a bug report? The current status of our project makes it not very easy to extract example matrices to send you for analysis and testing, although I might be able to do so if necessary. Thanks so much again for ojAlgo! --Chris Forden |
From: Anders P. <an...@op...> - 2011-03-15 21:08:51
|
It's been temporarily down for some time now. It will eventually get back up, but not until I've finished "the next version". It's not an applet but a servlet, and it's not open source. Everything I used to build it is open source, but not the application itself. The class you want is: http://ojalgo.org/generated/org/ojalgo/finance/portfolio/BlackLittermanModel.html it is part of ojAlgo (open source). The org.ojalgo.finance.portfolio package has been refactored (api-breaking) since v29 was released and most likely will be further before v30 is finally released. /Anders On 15 mar 2011, at 03.27, zero fromzero wrote: > HI, > Thanks for reply. In fact, I am a freshman about ojalgo project. I am a quant on researching blacklittleman for statistical arbitrage portfolio. I am very happy to know that ojalgo has developed a prototype application using the Black-Litterman model for portfolio selection. But I see from your website(http://www.ojalgo.org/blapp.html) This application has been temporily down. However, I am still wanting to know whether I can get this prototype application (applet) open source code, since it is a good startpoint and very valueable for my research. Thanks a lot! > Best Regards, > zhanglianhua > paristrading > ------------------------------------------------------------------------------ > Colocation vs. Managed Hosting > A question and answer guide to determining the best fit > for your organization - today and in the future. > http://p.sf.net/sfu/internap-sfd2d_______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: zero f. <zer...@gm...> - 2011-03-15 02:27:35
|
HI, Thanks for reply. In fact, I am a freshman about ojalgo project. I am a quant on researching blacklittleman for statistical arbitrage portfolio. I am very happy to know that ojalgo has developed a prototype application<http://www.ojalgo.org/blapp.html>using the Black-Litterman model for portfolio selection. But I see from your website(http://www.ojalgo.org/blapp.html) This application has been temporily down. However, I am still wanting to know whether I can get this prototype application <http://www.ojalgo.org/blapp.html> (applet) open source code, since it is a good startpoint and very valueable for my research. Thanks a lot! Best Regards, zhanglianhua paristrading |
From: Anders P. <an...@op...> - 2011-03-14 19:52:20
|
Are you referring to the fact that is says "read-only" on the list archive page at sourceforge? http://sourceforge.net/mailarchive/forum.php?forum_name=ojalgo-user I don't think there's anything I can do about that. You can reply to the messages you receive as a list member, and you can read the list archives. Just write a new message with your question. /Anders On 14 mar 2011, at 00.28, zero fromzero wrote: > HI, > I have some questions and I want to reply the ojalgo-user archive > topic, can you give me the authentication? > Thanks very much! > Best Regards, > zhanglianhua > pairstrading > ------------------------------------------------------------------------------ > Colocation vs. Managed Hosting > A question and answer guide to determining the best fit > for your organization - today and in the future. > http://p.sf.net/sfu/internap-sfd2d_______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: zero f. <zer...@gm...> - 2011-03-13 23:28:58
|
HI, I have some questions and I want to reply the ojalgo-user<oja...@li...> archive topic, can you give me the authentication? Thanks very much! Best Regards, zhanglianhua pairstrading |
From: Anders P. <an...@op...> - 2011-02-28 21:26:06
|
Released the snapshot v29.45 earlier today. If you're using any of the latter v29.xx snapshots you should move to this latest release as it contains several important bug fixes. http://ojalgo.org/change_log.html http://sourceforge.net/projects/ojalgo/files/ojAlgo/ v30 will be released later this spring, /Anders |
From: Harsha N. <har...@ya...> - 2010-11-16 15:56:15
|
Thanks for fixing the code. My interest is in generally using the optimization and perhaps the finance package. I am trying to understand its usage and hence downloaded the code. btw, not sure how to reply back to the thread on sourceforge, since the archive is marked "read-only". --- On Mon, 15/11/10, Harsha Nagesh <har...@ya...> wrote: > From: Harsha Nagesh <har...@ya...> > Subject: Devproj does not compile > To: oja...@li... > Date: Monday, 15 November, 2010, 9:45 AM > Hi - I just checked out code from > CVS. There are 2 main problems and the code does not > compile. > > org.ojalgo.random.process.MultidemsionalProcess is not > checked in and is used in AbstractSimulator in > org.ojalgo.randon.process.simulator > This leads to 6 compilation errors. > > Line 56 in AbstractSimulator also has an error "getValue is > undefined for the type P". > > I browsed CVS online as well and this class seems to be > missing. > Could you please fix these? > > Also, which package/class has unit tests/junits/examples > that we could try out to begin with > > Thanks > Harsha > > > |
From: Anders P. <an...@op...> - 2010-11-15 20:09:40
|
That was a temporary problem (believe this was the only time ever I checked in code that did't compile). The code compiles now! The org.ojalgo.randon.process.* package is now completely rewritten, and is not compatible with what was there before. Is that package what you were interested in? This code is not "stable" - not sure I'm done refactoring. TestProj contains the junit tests, and could function as a collection of examples. The package structure of TestProj matches that of DevProj. To build ojAlgo from source using the supplied ant script you need to check out all 5 cvs modules. Further the script assumes that DevProj and TestProj are renamed ojAlgo and ojAlgoTests respectively. (Actually you can name the projects anything you want. You just modify build.properties to match.) /Anders On 15 nov 2010, at 15.45, Harsha Nagesh wrote: > Hi - I just checked out code from CVS. There are 2 main problems and the code does not compile. > > org.ojalgo.random.process.MultidemsionalProcess is not checked in and is used in AbstractSimulator in org.ojalgo.randon.process.simulator > This leads to 6 compilation errors. > > Line 56 in AbstractSimulator also has an error "getValue is undefined for the type P". > > I browsed CVS online as well and this class seems to be missing. > Could you please fix these? > > Also, which package/class has unit tests/junits/examples that we could try out to begin with > > Thanks > Harsha > > > > ------------------------------------------------------------------------------ > Centralized Desktop Delivery: Dell and VMware Reference Architecture > Simplifying enterprise desktop deployment and management using > Dell EqualLogic storage and VMware View: A highly scalable, end-to-end > client virtualization framework. Read more! > http://p.sf.net/sfu/dell-eql-dev2dev > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > |