ojalgo-user Mailing List for oj! Algorithms (Page 25)
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...> - 2008-01-05 11:40:28
|
On 5 jan 2008, at 08.28, Andreas Andreakis wrote: > Hi, > > there can be a feasible solution, if a vector v can be expressed as =20= > a convex combination of the vectors v1,...,vn > > like this: v =3D c1*v1+c2*v2+...+cn*vn Then the "best fit" solution will be feasible (perfect fit). > My problem is actually: given the vectors v1,,.,vn and given the =20 > vector v, I need to find the coefficients c1,,.,cn which are valid. > A valid solution exists if v is inside the convex set, which is =20 > spanned by the vectors v1,..,vn. > > If the vector v can not be expressed as a convex combination of =20 > v1,,.,vn, that there is no possible solution to this problem. > > > I have already a solution in maple for this, using a Linear =20 > ProgrammingSolver: > LPSolve(NoUserValue, [NoUserValue, NoUserValue, A, v], assume =3D =20 > nonnegative)[2] > > where A is a Matrix containing the vectors v1,..,vn. Where every =20 > vector is a column in the matrix. > v is a vector (the actual v vector of the description above) ojAlgo does not have an LP solver, but a QP solver that you should be =20= able to use in roughly the same way. > However, I hope to find a java library which is capable of the same ;) You can do this with ojAlgo, It wont be as easy as with Maple. You =20 have to know and code a little more. /Anders > On Jan 5, 2008 1:39 AM, Anders Peterson < anders@> wrote: > If you you have 50 variables and several hundred equations there > typically is no feasible solution. > > You can get a "best fit" solution using the QR or SVD decompositions > but those cannot handle the constraints/inequalities that the > variables must be non-negative. You'll have to invent something to > handle that. > > /Anders > > On 4 jan 2008, at 16.51, Andreas Andreakis wrote: > > > hi, > > > > I want to find a solution to the following problem: > > > > (explained by example) > > 1 *c1 + 4 * c2 + 4* c3 + 4 * c4 =3D 2.5 > > 1 *c1 + 4 * c2 + 1* c3 + 4 * c4 =3D 3.0 > > > > here the constraints: > > 1) c1+c2+c3+c4 =3D 1 (of course this could be expressed as an > > additional equation: c1 + c2 + c3 + c4 =3D 1.0) > > 2) c1,c2,c3 and c4 are all positive > > > > Important is that I need only one and feasible solution, thus the > > computation should be as fast as possible. So there is no need to > > search for every possible result. > > And it needs to work with doubles (not only integers, because some > > libraries work only with integers) > > > > Actually the solution needs to scale for several dozens c=B4s ( = there > > will not be only 4 like c1,c2,c3,c4), but more like 50 c1, > > c2,...,c49, c50 > > And there will not be only two equations (like in the example) but > > several hundred. > > > > > > So the questions are: > > 1) can I find a solution using ojAlgo ? > > 2) how will the performance be ? > > 3) could you give me a code snipped which is able to compute the > > given example ? (I will generalize it then myself) > > > > kind regards, > > Andreas > > =20 > ---------------------------------------------------------------------- > > --- > > This SF.net email is sponsored by: Microsoft > > Defy all challenges. Microsoft(R) Visual Studio 2005. > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > _______________________________________________ > > ojAlgo-user mailing list > > ojA...@li... > > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > > ----------------------------------------------------------------------=20= > --- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > ----------------------------------------------------------------------=20= > --- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/=20 > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: Andreas A. <and...@go...> - 2008-01-05 07:28:52
|
Hi, there can be a feasible solution, if a vector v can be expressed as a conve= x combination of the vectors v1,...,vn like this: v =3D c1*v1+c2*v2+...+cn*vn My problem is actually: given the vectors v1,,.,vn and given the vector v, = I need to find the coefficients c1,,.,cn which are valid. A valid solution exists if v is inside the convex set, which is spanned by the vectors v1,..,vn. If the vector v can not be expressed as a convex combination of v1,,.,vn, that there is no possible solution to this problem. I have already a solution in maple for this, using a Linear ProgrammingSolver: LPSolve(NoUserValue, [NoUserValue, NoUserValue, A, v], assume =3D nonnegative)[2] where A is a Matrix containing the vectors v1,..,vn. Where every vector is = a column in the matrix. v is a vector (the actual v vector of the description above) However, I hope to find a java library which is capable of the same ;) regards, Andreas On Jan 5, 2008 1:39 AM, Anders Peterson <an...@op...> wrote: > If you you have 50 variables and several hundred equations there > typically is no feasible solution. > > You can get a "best fit" solution using the QR or SVD decompositions > but those cannot handle the constraints/inequalities that the > variables must be non-negative. You'll have to invent something to > handle that. > > /Anders > > On 4 jan 2008, at 16.51, Andreas Andreakis wrote: > > > hi, > > > > I want to find a solution to the following problem: > > > > (explained by example) > > 1 *c1 + 4 * c2 + 4* c3 + 4 * c4 =3D 2.5 > > 1 *c1 + 4 * c2 + 1* c3 + 4 * c4 =3D 3.0 > > > > here the constraints: > > 1) c1+c2+c3+c4 =3D 1 (of course this could be expressed as an > > additional equation: c1 + c2 + c3 + c4 =3D 1.0) > > 2) c1,c2,c3 and c4 are all positive > > > > Important is that I need only one and feasible solution, thus the > > computation should be as fast as possible. So there is no need to > > search for every possible result. > > And it needs to work with doubles (not only integers, because some > > libraries work only with integers) > > > > Actually the solution needs to scale for several dozens c=B4s ( there > > will not be only 4 like c1,c2,c3,c4), but more like 50 c1, > > c2,...,c49, c50 > > And there will not be only two equations (like in the example) but > > several hundred. > > > > > > So the questions are: > > 1) can I find a solution using ojAlgo ? > > 2) how will the performance be ? > > 3) could you give me a code snipped which is able to compute the > > given example ? (I will generalize it then myself) > > > > kind regards, > > Andreas > > ---------------------------------------------------------------------- > > --- > > This SF.net email is sponsored by: Microsoft > > Defy all challenges. Microsoft(R) Visual Studio 2005. > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > _______________________________________________ > > ojAlgo-user mailing list > > ojA...@li... > > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > |
From: Anders P. <an...@op...> - 2008-01-05 00:39:51
|
If you you have 50 variables and several hundred equations there =20 typically is no feasible solution. You can get a "best fit" solution using the QR or SVD decompositions =20 but those cannot handle the constraints/inequalities that the =20 variables must be non-negative. You'll have to invent something to =20 handle that. /Anders On 4 jan 2008, at 16.51, Andreas Andreakis wrote: > hi, > > I want to find a solution to the following problem: > > (explained by example) > 1 *c1 + 4 * c2 + 4* c3 + 4 * c4 =3D 2.5 > 1 *c1 + 4 * c2 + 1* c3 + 4 * c4 =3D 3.0 > > here the constraints: > 1) c1+c2+c3+c4 =3D 1 (of course this could be expressed as an =20 > additional equation: c1 + c2 + c3 + c4 =3D 1.0) > 2) c1,c2,c3 and c4 are all positive > > Important is that I need only one and feasible solution, thus the =20 > computation should be as fast as possible. So there is no need to =20 > search for every possible result. > And it needs to work with doubles (not only integers, because some =20 > libraries work only with integers) > > Actually the solution needs to scale for several dozens c=B4s ( there =20= > will not be only 4 like c1,c2,c3,c4), but more like 50 c1, =20 > c2,...,c49, c50 > And there will not be only two equations (like in the example) but =20 > several hundred. > > > So the questions are: > 1) can I find a solution using ojAlgo ? > 2) how will the performance be ? > 3) could you give me a code snipped which is able to compute the =20 > given example ? (I will generalize it then myself) > > kind regards, > Andreas > ----------------------------------------------------------------------=20= > --- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/=20 > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: Andreas A. <and...@go...> - 2008-01-04 15:51:21
|
hi, I want to find a solution to the following problem: (explained by example) 1 *c1 + 4 * c2 + 4* c3 + 4 * c4 =3D 2.5 1 *c1 + 4 * c2 + 1* c3 + 4 * c4 =3D 3.0 here the constraints: 1) c1+c2+c3+c4 =3D 1 (of course this could be expressed as an additional equation: c1 + c2 + c3 + c4 =3D 1.0) 2) c1,c2,c3 and c4 are all positive Important is that I need only one and feasible solution, thus the computation should be as fast as possible. So there is no need to search fo= r every possible result. And it needs to work with doubles (not only integers, because some librarie= s work only with integers) Actually the solution needs to scale for several dozens c=B4s ( there will = not be only 4 like c1,c2,c3,c4), but more like 50 c1, c2,...,c49, c50 And there will not be only two equations (like in the example) but several hundred. So the questions are: 1) can I find a solution using ojAlgo ? 2) how will the performance be ? 3) could you give me a code snipped which is able to compute the given example ? (I will generalize it then myself) kind regards, Andreas |
From: Anders P. <and...@ma...> - 2008-01-03 08:19:27
|
New comparison between the ojAlgo SVD implementation and Jama's. ojAlgo is now up to x35 faster than Jama! One important difference between these two implementations is that when Jama is done decomposing the two singular vector matrices are fully (explicitly) calculated. With the ojAlgo version they are only half done and are being calculated/completed in separate threads. This is similar to how the QR decomposition (both Jama and ojAlgo) behaves (except for the multi-threading), The Q matrix of the QR decomposition is not explicitly calculated during the decomposition algorithm. It is constructed when you ask for it. With the ojAlgo SVD the two singular vector matrices are always calculated but in separate threads. When/if you want to access them you may have to wait for them to finish... /Anders On 6 dec 2007, at 17.11, Anders Peterson wrote: > Just ran the tests now (on my iMac desktop computer). > > 1000x1000 > Jama: 54,040ms > ojAlgo: 186,578ms Now they run at roughly the same speed.. > 10,000x100 > Jama: 6,985ms > ojAlgo: 2,945ms ojAlgo is now x10 faster. > 100,000x100 > Jama: 225,812ms > ojAlgo: 39,411ms ojAlgo is now x35 faster. > 100,000x10 > Jama: 2,317ms > ojAlgo: 312ms ojAlgo is now x4 faster. > On 6 dec 2007, at 16.04, Jacob Martin wrote: > >> Sounds really good! Can you please send the actual times for >> these matrices? >> >> Were they random integer/real/complex? >> >> -----Original Message----- >>> From: Anders Peterson <an...@op...> >> >> Date: Thu, 6 Dec 2007 12:37:09 >> To:"'oja...@li...'" <ojalgo- >> us...@li...> >> Subject: Re: [ojAlgo-user] New SVD-implementation >> >> >> Compared to Jama (highly preliminary) >> >> 1,000x1,000: Jama is 3-4 times faster >> 100,000x100: ojAlgo is 5-6 times faster >> >> Actually I'm quite surprised about this. I didn't expect ojAlgo to be >> faster than Jama in any case. The ojAlgo-SVD is a very high-level >> implementation (look at the source code, it's very simple). I guess >> that means the underlying code is efficient. >> >> Jama is "more correct" since ojAlgo does not yet order the singular >> values in the usual way (and even leaves negative values). This will >> of course some how be addressed. >> >> ojAlgo-SVD uses Jacobi rotations because that will allow a multi- >> threaded algorithm. The algorithm is not yet multi-threaded. When it >> is; I expect it will be much faster with large matrices (provided >> there is more than one CPU available). >> >> /Anders >> >> On 5 dec 2007, at 10.09, Anders Peterson wrote: >> >>> Is anyone interested in testing the new SVD-algorithm that will be >>> included in the next release? >>> >>> It's already in CVS... In particular I'd like it if someone could >>> help me test the ComplexNumber version - it can handle BigDecimal, >>> ComplexNumber and double. >>> >>> The plan is to release the next/new version some time soon after >>> New Year. >>> >>> /Anders >>> >>> >>> >>> >> >> >> --------------------------------------------------------------------- >> ---- >> SF.Net email is sponsored by: The Future of Linux Business White >> Paper >> from Novell. From the desktop to the data center, Linux is going >> mainstream. Let it simplify your IT future. >> http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 >> _______________________________________________ >> ojAlgo-user mailing list >> ojA...@li... >> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >> --------------------------------------------------------------------- >> ---- >> SF.Net email is sponsored by: The Future of Linux Business White >> Paper >> from Novell. From the desktop to the data center, Linux is going >> mainstream. Let it simplify your IT future. >> http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 >> _______________________________________________ >> ojAlgo-user mailing list >> ojA...@li... >> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >> >> > |
From: Anders P. <an...@op...> - 2007-12-29 16:37:40
|
The fix is in CVS and will be included with the next release. If you'd like to fix the problem with your current copy of ojAlgo you should change the MatrixUtils.EXECUTOR ExecutorService to be a ThreadPoolExecutor with no (very high) pool size limit. /Anders On 11 dec 2007, at 17.43, Anders Peterson wrote: > Very strange... > > I get the same problem when I run your code. The program hangs on > the line > > tmpBase = tmpBaseFuture.get(); > > in the > > public MatrixStore<N> multiplyRight(MatrixStore<N> aStore) {...} > > method of the MergedColumnsStore class. > > > I have unit tests that test (the performance) of that class that > work just fine, but with your program it does not work. > > I get the feeling the problem is related to how the program is > launched. Can you test running that program outside of eclipse > (that you seem to be using) or as as a junit test from within > eclipse or from an Ant script. > > > If you replace the last line of your createSx() method to use the > PrimitiveMatrix copy constructor you get rid of the internal > MergedColumnsStore. > > return new PrimitiveMatrix(sx); > > Of course you shouldn't have to do this! ...but it will work around > the problem. > > > I leave for a holiday shortly. Not sure I have time to solve this > problem now. > > /Anders > > > On 11 dec 2007, at 16.44, Tor Erik Askeland wrote: > >> Hi, >> >> I added code to reproduce the "hanging". I also tried using >> multiplyLeft() which you suggested, but it yielded the same result >> unfortunately... >> >> The code is a bit messy, but I tried adding a comment to explain >> things. >> >> >> Tor Erik<Test.java> > |
From: Anders P. <an...@op...> - 2007-12-11 16:43:50
|
Very strange... I get the same problem when I run your code. The program hangs on the line tmpBase = tmpBaseFuture.get(); in the public MatrixStore<N> multiplyRight(MatrixStore<N> aStore) {...} method of the MergedColumnsStore class. I have unit tests that test (the performance) of that class that work just fine, but with your program it does not work. I get the feeling the problem is related to how the program is launched. Can you test running that program outside of eclipse (that you seem to be using) or as as a junit test from within eclipse or from an Ant script. If you replace the last line of your createSx() method to use the PrimitiveMatrix copy constructor you get rid of the internal MergedColumnsStore. return new PrimitiveMatrix(sx); Of course you shouldn't have to do this! ...but it will work around the problem. I leave for a holiday shortly. Not sure I have time to solve this problem now. /Anders On 11 dec 2007, at 16.44, Tor Erik Askeland wrote: > Hi, > > I added code to reproduce the "hanging". I also tried using > multiplyLeft() which you suggested, but it yielded the same result > unfortunately... > > The code is a bit messy, but I tried adding a comment to explain > things. > > > Tor Erik<Test.java> |
From: Anders P. <an...@op...> - 2007-12-10 21:01:31
|
Can you send me code that reproduce the problem? You have to "copy" the history of the matrices you use in that multiplication. It matters how the they were created. /Anders On 10 dec 2007, at 17.49, Anders Peterson wrote: > On 10 dec 2007, at 14.20, Tor Erik Askeland wrote: > >> Hi, >> >> I'm quite new to ojAlgo and I'm trying to do a matrix multiplication. >> >> Here is the snippet of code I'm trying to run: >> >> r = sx.multiplyRight(currentState); >> r = r.add(sxPrev.multiplyRight(previousState)); >> >> Where sx is 12x2, currentState is 2x1, sxPrev is 12x2 and >> previousState is 2x1. They are all the type PrimitiveMatrix, but I'm >> just using the BasicMatrix interface. R is a BasicMatrix by the way. >> >> This should result in r being a vector of size 12x1, but the computer >> just hangs on the first line and doesn't run past it. > > Never experienced "just hanging" with ojAlgo. Can you step through > the code in the debugger to see what happens? > > Does using multiplyLeft instead work? > > r = currentState.multiplyLeft(sx); > > /Anders > > >> The second line does however run properly if the first line is >> commented out. >> >> Have anyone got any suggestions to what the problem might be? >> >> >> Tor Erik >> >> >> --------------------------------------------------------------------- >> ---- >> SF.Net email is sponsored by: >> Check out the new SourceForge.net Marketplace. >> It's the best place to buy or sell services for >> just about anything Open Source. >> http://sourceforge.net/services/buy/index.php >> _______________________________________________ >> ojAlgo-user mailing list >> ojA...@li... >> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >> >> > |
From: Anders P. <an...@op...> - 2007-12-10 16:49:21
|
On 10 dec 2007, at 14.20, Tor Erik Askeland wrote: > Hi, > > I'm quite new to ojAlgo and I'm trying to do a matrix multiplication. > > Here is the snippet of code I'm trying to run: > > r = sx.multiplyRight(currentState); > r = r.add(sxPrev.multiplyRight(previousState)); > > Where sx is 12x2, currentState is 2x1, sxPrev is 12x2 and > previousState is 2x1. They are all the type PrimitiveMatrix, but I'm > just using the BasicMatrix interface. R is a BasicMatrix by the way. > > This should result in r being a vector of size 12x1, but the computer > just hangs on the first line and doesn't run past it. Never experienced "just hanging" with ojAlgo. Can you step through the code in the debugger to see what happens? Does using multiplyLeft instead work? r = currentState.multiplyLeft(sx); /Anders > The second line does however run properly if the first line is > commented out. > > Have anyone got any suggestions to what the problem might be? > > > Tor Erik > > > ---------------------------------------------------------------------- > --- > SF.Net email is sponsored by: > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > |
From: Tor E. A. <tor...@st...> - 2007-12-10 13:20:49
|
Hi, I'm quite new to ojAlgo and I'm trying to do a matrix multiplication. Here is the snippet of code I'm trying to run: r = sx.multiplyRight(currentState); r = r.add(sxPrev.multiplyRight(previousState)); Where sx is 12x2, currentState is 2x1, sxPrev is 12x2 and previousState is 2x1. They are all the type PrimitiveMatrix, but I'm just using the BasicMatrix interface. R is a BasicMatrix by the way. This should result in r being a vector of size 12x1, but the computer just hangs on the first line and doesn't run past it. The second line does however run properly if the first line is commented out. Have anyone got any suggestions to what the problem might be? Tor Erik |
From: Anders P. <an...@op...> - 2007-12-06 16:44:24
|
I'm really not making any claims regarding the code's capabilities. I just think that something I wrote this weekend looks promising... Please make your own tests! Then you can test whatever you want any way you like it. Just check out the DevProj module from CVS and then write code that may look something like this: MatrixStore<Double> tmpA = PrimitiveMatrix.FACTORY.buildRandom(2000, 2000).toPrimitiveStore(); long tmpStart; long tmpStop; SingularValue<Double> tmpNew = SingularValueDecomposition.makePrimitive(); tmpStart = System.currentTimeMillis(); tmpNew.compute(tmpA); tmpStop = System.currentTimeMillis(); System.out.println("New Time in millis: " + (tmpStop - tmpStart)); SingularValue<Double> tmpJama = SingularValueDecomposition.makeJama(); tmpStart = System.currentTimeMillis(); tmpJama.compute(tmpA); tmpStop = System.currentTimeMillis(); System.out.println("Jama Time in millis: " + (tmpStop - tmpStart)); /Anders On 6 dec 2007, at 17.22, Jacob Martin wrote: > How many runs are these results averaged over? > > Also, how about symmetric integer/real/complex matrices? Wonder > what would > happen if you tried to compare 2000x2000 symmetric with 2000x2000 > non-symmetric. > > If you point me to the code for the tests, I can try it out on my > quad core > system (in a few days when it get's finished with this 7 day > experiment it is > doing). > > Jake > > On Thursday 06 December 2007, Anders Peterson wrote: >> Just ran the tests now (on my iMac desktop computer). >> >> 1000x1000 >> Jama: 54,040ms >> ojAlgo: 186,578ms >> >> 10,000x100 >> Jama: 6,985ms >> ojAlgo: 2,945ms >> >> 100,000x100 >> Jama: 225,812ms >> ojAlgo: 39,411ms >> >> 100,000x10 >> Jama: 2,317ms >> ojAlgo: 312ms >> >> The matrices are random generated (dense) real matrices. >> >> /Anders >> >> On 6 dec 2007, at 16.04, Jacob Martin wrote: >>> Sounds really good! Can you please send the actual times for these >>> matrices? >>> >>> Were they random integer/real/complex? >>> >>> -----Original Message----- >>> >>>> From: Anders Peterson <an...@op...> >>> >>> Date: Thu, 6 Dec 2007 12:37:09 >>> To:"'oja...@li...'" <ojalgo- >>> us...@li...> >>> Subject: Re: [ojAlgo-user] New SVD-implementation >>> >>> >>> Compared to Jama (highly preliminary) >>> >>> 1,000x1,000: Jama is 3-4 times faster >>> 100,000x100: ojAlgo is 5-6 times faster >>> >>> Actually I'm quite surprised about this. I didn't expect ojAlgo >>> to be >>> faster than Jama in any case. The ojAlgo-SVD is a very high-level >>> implementation (look at the source code, it's very simple). I guess >>> that means the underlying code is efficient. >>> >>> Jama is "more correct" since ojAlgo does not yet order the singular >>> values in the usual way (and even leaves negative values). This will >>> of course some how be addressed. >>> >>> ojAlgo-SVD uses Jacobi rotations because that will allow a multi- >>> threaded algorithm. The algorithm is not yet multi-threaded. When it >>> is; I expect it will be much faster with large matrices (provided >>> there is more than one CPU available). >>> >>> /Anders >>> >>> On 5 dec 2007, at 10.09, Anders Peterson wrote: >>>> Is anyone interested in testing the new SVD-algorithm that will be >>>> included in the next release? >>>> >>>> It's already in CVS... In particular I'd like it if someone could >>>> help me test the ComplexNumber version - it can handle BigDecimal, >>>> ComplexNumber and double. >>>> >>>> The plan is to release the next/new version some time soon after >>>> New Year. >>>> >>>> /Anders >>> >>> -------------------------------------------------------------------- >>> -- >>> --- >>> SF.Net email is sponsored by: The Future of Linux Business White >>> Paper >>> from Novell. From the desktop to the data center, Linux is going >>> mainstream. Let it simplify your IT future. >>> http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 >>> _______________________________________________ >>> ojAlgo-user mailing list >>> ojA...@li... >>> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >>> -------------------------------------------------------------------- >>> -- >>> --- >>> SF.Net email is sponsored by: The Future of Linux Business White >>> Paper >>> from Novell. From the desktop to the data center, Linux is going >>> mainstream. Let it simplify your IT future. >>> http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 >>> _______________________________________________ >>> ojAlgo-user mailing list >>> ojA...@li... >>> https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > > > ---------------------------------------------------------------------- > --- > SF.Net email is sponsored by: The Future of Linux Business White Paper > from Novell. From the desktop to the data center, Linux is going > mainstream. Let it simplify your IT future. > http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > |
From: Jacob M. <jac...@gm...> - 2007-12-06 16:27:34
|
How many runs are these results averaged over? Also, how about symmetric integer/real/complex matrices? Wonder what would happen if you tried to compare 2000x2000 symmetric with 2000x2000 non-symmetric. If you point me to the code for the tests, I can try it out on my quad core system (in a few days when it get's finished with this 7 day experiment it is doing). Jake On Thursday 06 December 2007, Anders Peterson wrote: > Just ran the tests now (on my iMac desktop computer). > > 1000x1000 > Jama: 54,040ms > ojAlgo: 186,578ms > > 10,000x100 > Jama: 6,985ms > ojAlgo: 2,945ms > > 100,000x100 > Jama: 225,812ms > ojAlgo: 39,411ms > > 100,000x10 > Jama: 2,317ms > ojAlgo: 312ms > > The matrices are random generated (dense) real matrices. > > /Anders > > On 6 dec 2007, at 16.04, Jacob Martin wrote: > > Sounds really good! Can you please send the actual times for these > > matrices? > > > > Were they random integer/real/complex? > > > > -----Original Message----- > > > >> From: Anders Peterson <an...@op...> > > > > Date: Thu, 6 Dec 2007 12:37:09 > > To:"'oja...@li...'" <ojalgo- > > us...@li...> > > Subject: Re: [ojAlgo-user] New SVD-implementation > > > > > > Compared to Jama (highly preliminary) > > > > 1,000x1,000: Jama is 3-4 times faster > > 100,000x100: ojAlgo is 5-6 times faster > > > > Actually I'm quite surprised about this. I didn't expect ojAlgo to be > > faster than Jama in any case. The ojAlgo-SVD is a very high-level > > implementation (look at the source code, it's very simple). I guess > > that means the underlying code is efficient. > > > > Jama is "more correct" since ojAlgo does not yet order the singular > > values in the usual way (and even leaves negative values). This will > > of course some how be addressed. > > > > ojAlgo-SVD uses Jacobi rotations because that will allow a multi- > > threaded algorithm. The algorithm is not yet multi-threaded. When it > > is; I expect it will be much faster with large matrices (provided > > there is more than one CPU available). > > > > /Anders > > > > On 5 dec 2007, at 10.09, Anders Peterson wrote: > >> Is anyone interested in testing the new SVD-algorithm that will be > >> included in the next release? > >> > >> It's already in CVS... In particular I'd like it if someone could > >> help me test the ComplexNumber version - it can handle BigDecimal, > >> ComplexNumber and double. > >> > >> The plan is to release the next/new version some time soon after > >> New Year. > >> > >> /Anders > > > > ---------------------------------------------------------------------- > > --- > > SF.Net email is sponsored by: The Future of Linux Business White Paper > > from Novell. From the desktop to the data center, Linux is going > > mainstream. Let it simplify your IT future. > > http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 > > _______________________________________________ > > ojAlgo-user mailing list > > ojA...@li... > > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > ---------------------------------------------------------------------- > > --- > > SF.Net email is sponsored by: The Future of Linux Business White Paper > > from Novell. From the desktop to the data center, Linux is going > > mainstream. Let it simplify your IT future. > > http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 > > _______________________________________________ > > ojAlgo-user mailing list > > ojA...@li... > > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: Anders P. <an...@op...> - 2007-12-06 16:11:48
|
Just ran the tests now (on my iMac desktop computer). 1000x1000 Jama: 54,040ms ojAlgo: 186,578ms 10,000x100 Jama: 6,985ms ojAlgo: 2,945ms 100,000x100 Jama: 225,812ms ojAlgo: 39,411ms 100,000x10 Jama: 2,317ms ojAlgo: 312ms The matrices are random generated (dense) real matrices. /Anders On 6 dec 2007, at 16.04, Jacob Martin wrote: > Sounds really good! Can you please send the actual times for these > matrices? > > Were they random integer/real/complex? > > -----Original Message----- >> From: Anders Peterson <an...@op...> > > Date: Thu, 6 Dec 2007 12:37:09 > To:"'oja...@li...'" <ojalgo- > us...@li...> > Subject: Re: [ojAlgo-user] New SVD-implementation > > > Compared to Jama (highly preliminary) > > 1,000x1,000: Jama is 3-4 times faster > 100,000x100: ojAlgo is 5-6 times faster > > Actually I'm quite surprised about this. I didn't expect ojAlgo to be > faster than Jama in any case. The ojAlgo-SVD is a very high-level > implementation (look at the source code, it's very simple). I guess > that means the underlying code is efficient. > > Jama is "more correct" since ojAlgo does not yet order the singular > values in the usual way (and even leaves negative values). This will > of course some how be addressed. > > ojAlgo-SVD uses Jacobi rotations because that will allow a multi- > threaded algorithm. The algorithm is not yet multi-threaded. When it > is; I expect it will be much faster with large matrices (provided > there is more than one CPU available). > > /Anders > > On 5 dec 2007, at 10.09, Anders Peterson wrote: > >> Is anyone interested in testing the new SVD-algorithm that will be >> included in the next release? >> >> It's already in CVS... In particular I'd like it if someone could >> help me test the ComplexNumber version - it can handle BigDecimal, >> ComplexNumber and double. >> >> The plan is to release the next/new version some time soon after >> New Year. >> >> /Anders >> >> >> >> > > > ---------------------------------------------------------------------- > --- > SF.Net email is sponsored by: The Future of Linux Business White Paper > from Novell. From the desktop to the data center, Linux is going > mainstream. Let it simplify your IT future. > http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > ---------------------------------------------------------------------- > --- > SF.Net email is sponsored by: The Future of Linux Business White Paper > from Novell. From the desktop to the data center, Linux is going > mainstream. Let it simplify your IT future. > http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > |
From: <jac...@gm...> - 2007-12-06 15:05:34
|
U291bmRzIHJlYWxseSBnb29kISAgQ2FuIHlvdSBwbGVhc2Ugc2VuZCB0aGUgYWN0dWFsIHRpbWVz IGZvciB0aGVzZSBtYXRyaWNlcz8NCg0KV2VyZSB0aGV5IHJhbmRvbSBpbnRlZ2VyL3JlYWwvY29t cGxleD8NCiANCi0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tDQpGcm9tOiBBbmRlcnMgUGV0ZXJz b24gPGFuZGVyc0BvcHRpbWF0aWthLnNlPg0KDQpEYXRlOiBUaHUsIDYgRGVjIDIwMDcgMTI6Mzc6 MDkgDQpUbzoiJ29qYWxnby11c2VyQGxpc3RzLnNvdXJjZWZvcmdlLm5ldCciIDxvamFsZ28tdXNl ckBsaXN0cy5zb3VyY2Vmb3JnZS5uZXQ+DQpTdWJqZWN0OiBSZTogW29qQWxnby11c2VyXSBOZXcg U1ZELWltcGxlbWVudGF0aW9uDQoNCg0KQ29tcGFyZWQgdG8gSmFtYSAoaGlnaGx5IHByZWxpbWlu YXJ5KQ0KDQoxLDAwMHgxLDAwMDogSmFtYSBpcyAzLTQgdGltZXMgZmFzdGVyDQoxMDAsMDAweDEw MDogb2pBbGdvIGlzIDUtNiB0aW1lcyBmYXN0ZXINCg0KQWN0dWFsbHkgSSdtIHF1aXRlIHN1cnBy aXNlZCBhYm91dCB0aGlzLiBJIGRpZG4ndCBleHBlY3Qgb2pBbGdvIHRvIGJlICANCmZhc3RlciB0 aGFuIEphbWEgaW4gYW55IGNhc2UuIFRoZSBvakFsZ28tU1ZEIGlzIGEgdmVyeSBoaWdoLWxldmVs ICANCmltcGxlbWVudGF0aW9uIChsb29rIGF0IHRoZSBzb3VyY2UgY29kZSwgaXQncyB2ZXJ5IHNp bXBsZSkuIEkgZ3Vlc3MgIA0KdGhhdCBtZWFucyB0aGUgdW5kZXJseWluZyBjb2RlIGlzIGVmZmlj aWVudC4NCg0KSmFtYSBpcyAibW9yZSBjb3JyZWN0IiBzaW5jZSBvakFsZ28gZG9lcyBub3QgeWV0 IG9yZGVyIHRoZSBzaW5ndWxhciAgDQp2YWx1ZXMgaW4gdGhlIHVzdWFsIHdheSAoYW5kIGV2ZW4g bGVhdmVzIG5lZ2F0aXZlIHZhbHVlcykuIFRoaXMgd2lsbCAgDQpvZiBjb3Vyc2Ugc29tZSBob3cg YmUgYWRkcmVzc2VkLg0KDQpvakFsZ28tU1ZEIHVzZXMgSmFjb2JpIHJvdGF0aW9ucyBiZWNhdXNl IHRoYXQgd2lsbCBhbGxvdyBhIG11bHRpLSANCnRocmVhZGVkIGFsZ29yaXRobS4gVGhlIGFsZ29y aXRobSBpcyBub3QgeWV0IG11bHRpLXRocmVhZGVkLiBXaGVuIGl0ICANCmlzOyBJIGV4cGVjdCBp dCB3aWxsIGJlIG11Y2ggZmFzdGVyIHdpdGggbGFyZ2UgbWF0cmljZXMgKHByb3ZpZGVkICANCnRo ZXJlIGlzIG1vcmUgdGhhbiBvbmUgQ1BVIGF2YWlsYWJsZSkuDQoNCi9BbmRlcnMNCg0KT24gNSBk ZWMgMjAwNywgYXQgMTAuMDksIEFuZGVycyBQZXRlcnNvbiB3cm90ZToNCg0KPiBJcyBhbnlvbmUg aW50ZXJlc3RlZCBpbiB0ZXN0aW5nIHRoZSBuZXcgU1ZELWFsZ29yaXRobSB0aGF0IHdpbGwgYmUg IA0KPiBpbmNsdWRlZCBpbiB0aGUgbmV4dCByZWxlYXNlPw0KPg0KPiBJdCdzIGFscmVhZHkgaW4g Q1ZTLi4uIEluIHBhcnRpY3VsYXIgSSdkIGxpa2UgaXQgaWYgc29tZW9uZSBjb3VsZCAgDQo+IGhl bHAgbWUgdGVzdCB0aGUgQ29tcGxleE51bWJlciB2ZXJzaW9uIC0gaXQgY2FuIGhhbmRsZSBCaWdE ZWNpbWFsLCAgDQo+IENvbXBsZXhOdW1iZXIgYW5kIGRvdWJsZS4NCj4NCj4gVGhlIHBsYW4gaXMg dG8gcmVsZWFzZSB0aGUgbmV4dC9uZXcgdmVyc2lvbiBzb21lIHRpbWUgc29vbiBhZnRlciAgDQo+ IE5ldyBZZWFyLg0KPg0KPiAvQW5kZXJzDQo+DQo+DQo+DQo+DQoNCg0KLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LQ0KU0YuTmV0IGVtYWlsIGlzIHNwb25zb3JlZCBieTogVGhlIEZ1dHVyZSBvZiBMaW51eCBCdXNp bmVzcyBXaGl0ZSBQYXBlcg0KZnJvbSBOb3ZlbGwuICBGcm9tIHRoZSBkZXNrdG9wIHRvIHRoZSBk YXRhIGNlbnRlciwgTGludXggaXMgZ29pbmcNCm1haW5zdHJlYW0uICBMZXQgaXQgc2ltcGxpZnkg eW91ciBJVCBmdXR1cmUuDQpodHRwOi8vYWx0ZmFybS5tZWRpYXBsZXguY29tL2FkL2NrLzg4NTct NTAzMDctMTg5MTgtNA0KX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX18NCm9qQWxnby11c2VyIG1haWxpbmcgbGlzdA0Kb2pBbGdvLXVzZXJAbGlzdHMuc291cmNl Zm9yZ2UubmV0DQpodHRwczovL2xpc3RzLnNvdXJjZWZvcmdlLm5ldC9saXN0cy9saXN0aW5mby9v amFsZ28tdXNlcg0K |
From: Anders P. <an...@op...> - 2007-12-06 11:37:15
|
Compared to Jama (highly preliminary) 1,000x1,000: Jama is 3-4 times faster 100,000x100: ojAlgo is 5-6 times faster Actually I'm quite surprised about this. I didn't expect ojAlgo to be faster than Jama in any case. The ojAlgo-SVD is a very high-level implementation (look at the source code, it's very simple). I guess that means the underlying code is efficient. Jama is "more correct" since ojAlgo does not yet order the singular values in the usual way (and even leaves negative values). This will of course some how be addressed. ojAlgo-SVD uses Jacobi rotations because that will allow a multi- threaded algorithm. The algorithm is not yet multi-threaded. When it is; I expect it will be much faster with large matrices (provided there is more than one CPU available). /Anders On 5 dec 2007, at 10.09, Anders Peterson wrote: > Is anyone interested in testing the new SVD-algorithm that will be > included in the next release? > > It's already in CVS... In particular I'd like it if someone could > help me test the ComplexNumber version - it can handle BigDecimal, > ComplexNumber and double. > > The plan is to release the next/new version some time soon after > New Year. > > /Anders > > > > |
From: Anders P. <an...@op...> - 2007-12-05 09:09:19
|
Is anyone interested in testing the new SVD-algorithm that will be included in the next release? It's already in CVS... In particular I'd like it if someone could help me test the ComplexNumber version - it can handle BigDecimal, ComplexNumber and double. The plan is to release the next/new version some time soon after New Year. /Anders |
From: Anders P. <an...@op...> - 2007-10-29 10:09:07
|
I've done some updates on the ojAlgo web site. Perhaps not much is new, but one thing is at-least significantly rewritten. http://ojalgo.org/matrix_compare.html /Anders On 22 okt 2007, at 23.03, Anders Peterson wrote: > http://ojalgo.org/performance.html |
From: Anders P. <and...@op...> - 2007-10-26 13:33:24
|
More complete comparison results are available here: http://ojalgo.org/generated/comparison.xml It's my hope/intention that you should be able guess what the various tests measure from the class and method names. If not; loom at the source code... /Anders Anders Peterson wrote: > http://ojalgo.org/performance.html > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > > |
From: Anders P. <an...@op...> - 2007-10-22 21:03:09
|
http://ojalgo.org/performance.html |
From: Anders P. <and...@op...> - 2007-10-09 13:12:08
|
http://ojalgo.org/change_log.html SourceForge.net wrote: > Project: ojAlgo (ojalgo) > Package: ojAlgo > Date : 2007-10-09 15:08 > > Project "ojAlgo" ('ojalgo') has released the new version of package 'ojAlgo'. > You can download it from SourceForge.net by following this link: > <https://sourceforge.net/project/showfiles.php?group_id=79000&release_id=545382> > or browse Release Notes and ChangeLog by visiting this link: > <https://sourceforge.net/project/shownotes.php?release_id=545382> > > You receive this email because you requested to be notified when new versions > of this package were released. If you don't wish to be notified in the future, > please login to SourceForge.net and click this link: > <https://sourceforge.net/project/filemodule_unmonitor.php?filemodule_id=80289> > If you lost your SourceForge.net login name or password, refer to this document: > <https://sourceforge.net/docman/display_doc.php?docid=760&group_id=1> > > Note that you may receive this message indirectly via one of your mailing list > subscriptions. Please review message headers before reporting unsolicited > mailings. |
From: Anders P. <an...@op...> - 2007-08-23 12:45:17
|
There's no function that will give you a complete covariance matrix all at once, but there is code that will calculate correlations and covariances for you. http://ojalgo.org/generated/org/ojalgo/random/SampleSet.html Before you can create SampleSets from your BasicSeries you should make sure the series are coordinated. http://ojalgo.org/generated/org/ojalgo/series/CoordinationSet.html You must know your own risk aversion (factor). Mine is PI..... Either someone will tell you what it is or you have to experiment. If you run the BLApp protoype you can see what effect changing the value has. http://ojalgo.org/blapp.html /Anders On 23 aug 2007, at 13.20, Paul Netherwood wrote: > Is there a function in the library for calculating the covariance > matrix required for these routines or is there an easy way to > calculate it yourself with other functions in the library? > > What is the formula for the risk aversion field in > MarketEquilibrium class? > > Thanks in advance > > Paul Netherwood > > > > > ******************************************************************** > This message and any attachment are confidential. If you are not > the intended recipient please contact the sender, delete this > message and any attachment from your system and do not disclose, > copy or distribute the contents to any other person. Beach Horizon > LLP (Beach Horizon) is not responsible for any information > contained in this email. Beach Horizon reserves the right to > monitor all email messages passing through its network. > ******************************************************************** > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a > browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: Paul N. <pau...@be...> - 2007-08-23 11:22:51
|
Is there a function in the library for calculating the covariance matrix re= quired for these routines or is there an easy way to calculate it yourself = with other functions in the library? What is the formula for the risk aversion field in MarketEquilibrium class? Thanks in advance Paul Netherwood ******************************************************************** This message and any attachment are confidential. If you are not the inten= ded recipient please contact the sender, delete this message and any attach= ment from your system and do not disclose, copy or distribute the contents = to any other person. Beach Horizon LLP (Beach Horizon) is not responsible = for any information contained in this email. Beach Horizon reserves the ri= ght to monitor all email messages passing through its network. ******************************************************************** |
From: Anders P. <an...@op...> - 2007-07-25 12:19:30
|
Just noticed that the BLApp database server was turned off! ;-) Don't know when (or how) this happened. The application was up and running, but any data access would fail (including creating new users, updating passwords and logging in). /Anders On 14 jul 2007, at 11.43, Anders Peterson wrote: > ojAlgo is not an application. It's Java code you may use to build > your own application. The BLapp prototype application is built > using ojAlgo, but the source code for BLApp is not available to you. > > /Anders > > On 13 jul 2007, at 21.05, ken black wrote: > >> I am a "newbie" to Java so I am sure this is cockpit error------- >> when I click on the downloaded Ojalgo-20 >> executable Jar file in "Bin folder" I get an error message as follows >> "Failed to Load Main class manifest attribute from C >> \............bin\ojalgo.jar" >> >> What do I do? >> --------------------------------------------------------------------- >> ---- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> ojAlgo-user mailing list >> ojA...@li... >> https://lists.sourceforge.net/lists/listinfo/ojalgo-user > |
From: Anders P. <an...@op...> - 2007-07-18 14:18:07
|
On 18 jul 2007, at 12.38, Dimitri Pourbaix wrote: > On Wed, 18 Jul 2007, Anders Peterson wrote: > >> Both QR and SVD do least squares fitting. Just call solve(?) and >> that's what you get. QR is faster and often good enough, but in >> some cases it could have numerical problems that the SVD probably >> will not have. > > Well, in my case, robustness is more important than speed. If accuracy is what you want perhaps you should try BigQR http://ojalgo.org/generated/org/ojalgo/matrix/decomposition/BigQR.html /Anders >> Exactly how do you calculate the parameter covariance matrix using >> the SVD? > > Starting with V and S the two matrices from SVD, Sv is the double[] > array > of S > > double[][] Sm2v = new double[dimModel][dimModel]; > for (int i=0;i<dimModel;i++) { > for (int j=0;j<dimModel;j++) { > Sm2v[i][j]=0.0; > } > Sm2v[i][i]=1.0; > } > for (int j = 0; j < dimModel; j++) { > Sm2v[j][j] /= (Sv[j] * Sv[j]); > } > Matrix Sm2 = new Matrix(Sm2v); > covMat = V.times(Sm2.times(V.transpose())); > > Regards, > Dim. > ---------------------------------------------------------------------- > ------ > Dimitri Pourbaix * > Institut d'Astronomie et d'Astrophysique * Don't worry, be happy > CP 226, office 2.N4.211, building NO * and CARPE DIEM. > Universite Libre de Bruxelles * > Boulevard du Triomphe * Tel : +32-2-650.35.71 > B-1050 Bruxelles * Fax : +32-2-650.42.26 > http://sb9.astro.ulb.ac.be/~pourbaix * > mailto:pou...@as... > > |
From: Anders P. <ap...@op...> - 2007-07-18 14:01:37
|
I've added a method that calls compute() and solve() in turn on a MatrixDecomposition, in a separate thread. The task is added to an executor queue and dealt with on any available CPU (core). If you have many (a constant flow of) equation systems to solve and a computer with more than one CPU this can speed things up significantly. Roughly speaking you can do one compute/solve per available CPU simultaneously. /Anders /** * Will solve [aBody][X]=[aRHS] concurrently by first calling * {@link #compute(MatrixStore)} using [aBody], and then * {@link #solve(MatrixStore)} using [aRHS]. If either of the input [aBody] * or [aRHS] is set to null the corresponing calculation is skipped. * * @param aBody The equation system body * @param aRHS The equation system right hand side * @return The matrix decomposition and the equation system solution, [X] */ Future<Result<N>> solve(MatrixStore<N> aBody, MatrixStore<N> aRHS); |