Re: [math] OpenGamma library

2011-10-14 Thread Greg Sterijevski
On Fri, Oct 14, 2011 at 4:12 PM, Gilles Sadowski < gil...@harfang.homelinux.org> wrote: > Hello. > > > > > I believe that the BlockMatrix approach you have taken is actually quite > > good and might yield a bit more stable optimization improvement than > simple > > loop unrolling. Consider operati

Re: [math] OpenGamma library

2011-10-14 Thread Greg Sterijevski
On Fri, Oct 14, 2011 at 1:28 PM, Luc Maisonobe wrote: > Le 14/10/2011 20:08, Greg Sterijevski a écrit : > > I looked more closely at the package and it am impressed with the breadth >> of >> material covered. Moreover, this package will do to finance what Mahout is >>

Re: [math] OpenGamma library

2011-10-14 Thread Greg Sterijevski
I looked more closely at the package and it am impressed with the breadth of material covered. Moreover, this package will do to finance what Mahout is doing to companies like SAS and SPSS. Having spent a good part of my career in finance, this package (and others) will put a lot of small 'analytic

Re: [math] OpenGamma library

2011-10-14 Thread Greg Sterijevski
Interesting that they are making such heavy wind of their 'innovations' like loop unrolling. I would be interested in how much mileage they will get out of those tricks in more complicated code. I do not intend to disparage their approach, but maintaining code with too many cute optimizations costs

Re: [DISCUSS] Restyling the commons-skin

2011-10-08 Thread Greg Sterijevski
+1 from me. Looks great!

Re: svn commit: r1179935 - in /commons/proper/math/trunk/src: main/java/org/apache/commons/math/linear/ test/java/org/apache/commons/math/linear/

2011-10-07 Thread Greg Sterijevski
Sorry Luc, I had the file set on my linux box. When it died, I moved to the mac and neglected to make the changes. On Fri, Oct 7, 2011 at 10:21 AM, Greg Sterijevski wrote: > Will do. My aplogies! -Greg > > > On Fri, Oct 7, 2011 at 3:55 AM, Luc Maisonobe wrote: > >> Le

Re: svn commit: r1179935 - in /commons/proper/math/trunk/src: main/java/org/apache/commons/math/linear/ test/java/org/apache/commons/math/linear/

2011-10-07 Thread Greg Sterijevski
Will do. My aplogies! -Greg On Fri, Oct 7, 2011 at 3:55 AM, Luc Maisonobe wrote: > Le 07/10/2011 07:21, gr...@apache.org a écrit : > > Author: gregs >> Date: Fri Oct 7 05:21:17 2011 >> New Revision: 1179935 >> >> URL: >> http://svn.apache.org/viewvc?**rev=1179935&view=rev

Re: [MATH] Re: Pivoting QR Decomposition: Take Two!

2011-10-06 Thread Greg Sterijevski
On Thu, Oct 6, 2011 at 9:13 PM, Phil Steitz wrote: > Lets a) stop top-posting (Gilles has asked politely a couple of times now) > and b) stay focused on solving the problems we actually have. We could > endlessly debate refactoring approaches. Sorry about the top posting, I am big culprit here

Re: [MATH] Re: Pivoting QR Decomposition: Take Two!

2011-10-06 Thread Greg Sterijevski
If you really think about, all of the decomposition classes should be handled by factories. The decompositions all seem to occur in the constructor. Everything else is derived from those results, so one could argue that the actual decomposition code could be written very procedurally and put into t

Re: [MATH] Re: Pivoting QR Decomposition: Take Two!

2011-10-06 Thread Greg Sterijevski
Yes, this application would be similar to the ones you nixed. It would be a factory returning an abstract class, with the appropriate methods throwing exceptions (like getRank for the non-pivoting version-as Ted mentions in a later entry in this blog). As Ted asks, what is the issue with this? On

Re: [MATH] Re: Pivoting QR Decomposition: Take Two!

2011-10-05 Thread Greg Sterijevski
entation detail that the user really doesn't see much or care about. > No need to hide it, but absolutely no reason to put it in their face, > either. > > Pushing WIP code is always good. > > On Wed, Oct 5, 2011 at 5:06 PM, Greg Sterijevski >wrote: > > > I am s

Re: [MATH] Re: Pivoting QR Decomposition: Take Two!

2011-10-05 Thread Greg Sterijevski
I am sympathetic to this point of view [one class two algorithms-Ted's point], but it seems like a step into the C world. Could we not accomplish the same through some factory method? We can have two classes, but the user might only get a reference to the abstract base. The other reason is that the

Re: [MATH] Re: Pivoting QR Decomposition: Take Two!

2011-10-05 Thread Greg Sterijevski
x27;t play with something that works) 3. Keep all three until the next major release, marking QRDecomposition (the class) as deprecated. -Greg On Wed, Oct 5, 2011 at 9:39 AM, Gilles Sadowski < gil...@harfang.homelinux.org> wrote: > On Wed, Oct 05, 2011 at 08:46:55AM -0500, Greg Sterij

Re: [MATH] Re: Pivoting QR Decomposition: Take Two!

2011-10-05 Thread Greg Sterijevski
his clear. > > Additionally, any pivoting QRDecomposition class should also have a > getRank() method since it is after all 'rank-revealing' and in most (or > all?) cases it would be more efficient than > SingularValueDecomposition.getRank(). > > Chris. > > &g

Re: [MATH] Re: Pivoting QR Decomposition: Take Two!

2011-10-05 Thread Greg Sterijevski
Yes, in the interest of brevity I left out the fact that rank is calculated as well. This is exactly Luc's implementation from Marquardt-Levenberg. Is this what you are talking about with the cryptic 'all'? On Wed, Oct 5, 2011 at 7:20 AM, Ted Dunning wrote: > All. > > On Wed, Oct 5, 2011 at 12:

Re: [MATH] Re: Pivoting QR Decomposition: Take Two!

2011-10-05 Thread Greg Sterijevski
Hi Gilles, The class passes all current tests for QRDecomposition. Are you suggesting I rip out the QRDecomposition from OLSMultipleRegression...etc and then make sure there are no test failures? Or are you suggestion a new set of tests? -Greg On Wed, Oct 5, 2011 at 5:16 AM, Gilles Sadowski < gi

[MATH] Re: Pivoting QR Decomposition: Take Two!

2011-10-04 Thread Greg Sterijevski
My apologies! Forgot to tag the subject line. On Tue, Oct 4, 2011 at 8:35 PM, Greg Sterijevski wrote: > Hello all, > > A while back I was interested in being able to do pivoting qr > decomposition. I noticed that Chris Nix submitted a patch, but he indicated > that he had

Pivoting QR Decomposition: Take Two!

2011-10-04 Thread Greg Sterijevski
Hello all, A while back I was interested in being able to do pivoting qr decomposition. I noticed that Chris Nix submitted a patch, but he indicated that he had more work to do (testing and filling in functionality). In the discussion around this, Luc suggested that I look at the QR decomposition

Re: [math] Support for Abelian Groups and Rings?

2011-10-04 Thread Greg Sterijevski
Pardon my ignorance of Abelian Fields, but what would be a use of this set of classes? Do they simplify some calculation or make some code faster? The question is, "are they numerical?" On Tue, Oct 4, 2011 at 2:33 PM, Luc Maisonobe wrote: > Le 03/10/2011 19:50, Mikkel Meyer Andersen a écrit : >

Re: [math] break up MathUtils?

2011-10-03 Thread Greg Sterijevski
I think Gilles is on the mark here. +1 For the break up +1 For organizing along conceptual lines. -Greg On Mon, Oct 3, 2011 at 3:59 PM, Gilles Sadowski < gil...@harfang.homelinux.org> wrote: > On Mon, Oct 03, 2011 at 05:42:15PM +0200, Mikkel Meyer Andersen wrote: > > 2011/10/3 Phil Steitz : > >

Re: BOBYQA Question

2011-10-01 Thread Greg Sterijevski
gt; > On Sat, Oct 01, 2011 at 08:28:52PM -0500, Greg Sterijevski wrote: > > Per Phil's suggestion, they are now in > > test/../../optimizers/NISTBatteryTest.java See JIRA: MATH-678 for further > > info. > > There currently isn't much info over there... > &

Re: BOBYQA Question

2011-10-01 Thread Greg Sterijevski
< gil...@harfang.homelinux.org> wrote: > On Fri, Sep 30, 2011 at 05:35:28PM -0500, Greg Sterijevski wrote: > > Gilles, > > > > I have attached a test harness which shows one spot where BOBYQA fails. > > > > See the "NonLinearConjugateGradient" thread. > >

Re: [Math] NonLinearConjugateGradientOptimizer

2011-09-30 Thread Greg Sterijevski
I have added 4 more 'easy' cases from NIST's web site. I will check the test in, omitting the @Test annotation. On Fri, Sep 30, 2011 at 5:33 PM, Greg Sterijevski wrote: > But they all fail... except for verifying that my objective is correct at > the converged values. > &

Re: BOBYQA Question

2011-09-30 Thread Greg Sterijevski
Gilles, I have attached a test harness which shows one spot where BOBYQA fails. See the "NonLinearConjugateGradient" thread. Thanks, -Greg On Thu, Sep 29, 2011 at 6:06 PM, Gilles Sadowski < gil...@harfang.homelinux.org> wrote: > Hi. > > The work to be done on "BOBYQAOptimizer" is discussed in

Re: [Math] NonLinearConjugateGradientOptimizer

2011-09-30 Thread Greg Sterijevski
But they all fail... except for verifying that my objective is correct at the converged values. On Fri, Sep 30, 2011 at 4:51 PM, Greg Sterijevski wrote: > Hello All, > > I have been playing with the non linear optimizers in Commons for a few > days now. The context in which I a

Re: [Math] NonLinearConjugateGradientOptimizer

2011-09-30 Thread Greg Sterijevski
Hello All, I have been playing with the non linear optimizers in Commons for a few days now. The context in which I am working is Probit/Logit/Tobit type limited dependent variables models. These are well known problems. I found a very well known example of a probit estimation ( http://support.sas

Re: [Math] NonLinearConjugateGradientOptimizer

2011-09-29 Thread Greg Sterijevski
Will do. -Greg On Thu, Sep 29, 2011 at 6:19 PM, Gilles Sadowski < gil...@harfang.homelinux.org> wrote: > Hello Greg. > > > I have done what you suggested and notice that it (the optimizer) takes > > humongous steps in the search for an upper bound. I tried making the > initial > > step size small

Re: BOBYQA Method

2011-09-29 Thread Greg Sterijevski
Okay. As per your other email, I was not aware that the code was in flux. Thanks, -Greg On Thu, Sep 29, 2011 at 6:16 PM, Gilles Sadowski < gil...@harfang.homelinux.org> wrote: > Hi. > > > > > I would like to add the following method to BOBYQA: > > > > /** > > * > > * @return the n

Re: BOBYQA Question

2011-09-29 Thread Greg Sterijevski
Thank you. I am working on making my Limited Dependent Variable Regressions agnostic to the optimizer used. Plug and play (to the extent it is possible) is my aim. I will try to concoct a test which hits this code path. I have used the C version of BOBYQA under the COIN infrastructure. It is a dec

BOBYQA Method

2011-09-29 Thread Greg Sterijevski
Hello All, I would like to add the following method to BOBYQA: /** * * @return the number of interpolation points */ public int getNumberOfInterpolationPoints(){ return this.numberOfInterpolationPoints; } Any objections? -Greg

BOBYQA Question

2011-09-29 Thread Greg Sterijevski
Hello All, I am testing some Limited Dependent Variable regressions and in shopping for an optimizer I ran BOBYQA. I got the following exception: If this exception is thrown, just remove it from the code org.apache.commons.math.optimization.direct.PathIsExploredException: If this exception is thr

Re: [Math] NonLinearConjugateGradientOptimizer

2011-09-29 Thread Greg Sterijevski
Gilles, I have done what you suggested and notice that it (the optimizer) takes humongous steps in the search for an upper bound. I tried making the initial step size smaller, but to no avail. The Powell optimizer flies very quickly to an optimum. Maybe there is some misunderstanding in my usage

Re: [Math] Issues 650, 675, 676

2011-09-29 Thread Greg Sterijevski
Hold off on 675. I owe you a couple of changes, related to naming and some other issues we discussed on the ML. -Greg On Thu, Sep 29, 2011 at 1:44 PM, Luc Maisonobe wrote: > Le 29/09/2011 18:04, Gilles Sadowski a écrit : > > Hello. >> >> Referring to: >> >> https://issues.apache.org/**jira/b

[Math] NonLinearConjugateGradientOptimizer

2011-09-27 Thread Greg Sterijevski
Hello All, I am working on limited dependent variable regressions. I am testing part of a logit regression routine. As part of the estimation technique I am need to do some nonlinear optimization. Using the NonLinearConjugateGradientOptimizer, I submit my problem, but get the following exception:

Re: svn commit: r1175094 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/regression/MillerUpdatingRegression.java

2011-09-24 Thread Greg Sterijevski
Gilles, You must be an android or Jedi master to spot something that tiny! ;-) Yes, I am aware of the lowercase convention. I do intend to go through and clean up not only that, but other ugliness in Miller... I wanted to stay as close to the notation of the article as possible while I tested it.

Re: svn commit: r1174509 - in /commons/proper/math/trunk/src: main/java/org/apache/commons/math/exception/util/ main/java/org/apache/commons/math/stat/regression/ site/xdoc/ test/java/org/apache/commo

2011-09-23 Thread Greg Sterijevski
Okay, my bad. I thought I had looked through the list of enums, but I obviously was not as thorough as I should have been. Will make the changes that you suggest. Thank you, -Greg On Fri, Sep 23, 2011 at 5:51 AM, Gilles Sadowski < gil...@harfang.homelinux.org> wrote: > Hello. > > > Author: greg

Re: [Math] MathUtils.checkOrder

2011-09-22 Thread Greg Sterijevski
, 2011 at 8:39 AM, Gilles Sadowski < gil...@harfang.homelinux.org> wrote: > On Wed, Sep 21, 2011 at 08:31:00PM -0500, Greg Sterijevski wrote: > > Any objections to fixing this? > > Having a method > public static boolean isMonotone(double[] val, >

Re: [Math] MathUtils.checkOrder

2011-09-22 Thread Greg Sterijevski
Either is fine by me... ;) In case my opinion was solicited. On Thu, Sep 22, 2011 at 5:02 AM, Gilles Sadowski < gil...@harfang.homelinux.org> wrote: > > > >> As a side note, I notice now that "NonMonotonousSequenceException" > > > >> is misnamed. It should be "NonMonotoneSequenceException." I t

Re: [Math] MathUtils.checkOrder

2011-09-21 Thread Greg Sterijevski
Any objections to fixing this? On Wed, Sep 21, 2011 at 8:27 PM, Phil Steitz wrote: > On 9/21/11 6:11 PM, Greg Sterijevski wrote: > > One more question, there is a boolean argument called 'abort', what sense > > does it make to keep checking an array given you hav

Re: [Math] MathUtils.checkOrder

2011-09-21 Thread Greg Sterijevski
itz wrote: > On 9/21/11 4:33 PM, Greg Sterijevski wrote: > > Gilles, > > > > I do not understand why a non-monotone collection should throw a > > IllegalArgumentException...? There is nothing wrong with the argument, it > > just is not in corrected order. Wouldn'

Re: [Math] MathUtils.checkOrder

2011-09-21 Thread Greg Sterijevski
PM, Greg Sterijevski wrote: > > Gilles, > > > > I do not understand why a non-monotone collection should throw a > > IllegalArgumentException...? There is nothing wrong with the argument, it > > just is not in corrected order. Wouldn't it be better to return a fal

Re: [Math] MathUtils.checkOrder

2011-09-21 Thread Greg Sterijevski
: > On Wed, Sep 21, 2011 at 05:17:59PM -0500, Greg Sterijevski wrote: > > Meant to say add, not replace. My apologies. -Greg > > I like this better! ;-) > [But, still, please check the intended meaning of the first argument of > (sub-classes of) &qu

Re: [Math] MathUtils.checkOrder

2011-09-21 Thread Greg Sterijevski
at 05:17:59PM -0500, Greg Sterijevski wrote: > > Meant to say add, not replace. My apologies. -Greg > > I like this better! ;-) > [But, still, please check the intended meaning of the first argument of > (sub-classes of) "MathIllega

Re: [Math] MathUtils.checkOrder

2011-09-21 Thread Greg Sterijevski
I would not want to remove the current implementation (the one with double[] as an arg). However, I might want to check lists to make sure that they are monotonically increasing. I want to avoid writing a checkOrder method for int[], long[], float[],..., if it is possible. Also, one should be able

Re: [Math] MathUtils.checkOrder

2011-09-21 Thread Greg Sterijevski
Meant to say add, not replace. My apologies. -Greg On Wed, Sep 21, 2011 at 5:05 PM, Greg Sterijevski wrote: > Hello All, > > In MathUtils there exists the method: > > public static boolean checkOrder(double[] val, OrderDirection dir, >

[Math] MathUtils.checkOrder

2011-09-21 Thread Greg Sterijevski
Hello All, In MathUtils there exists the method: public static boolean checkOrder(double[] val, OrderDirection dir, boolean strict, boolean abort) { ...code omitted... } I would like to replace it with the method: public static boolean checkOrder(Co

Re: [math] Monitoring iterative algorithms

2011-09-12 Thread Greg Sterijevski
applications on which > we could base our arguments. > > Regarding the point on what exception should be thrown. I agree with > Gilles that it should be application specific (for linear iterative > solvers, the basic unit would probably be the number of matrix-vector > products). So

Re: [math] Monitoring iterative algorithms

2011-09-10 Thread Greg Sterijevski
I sent the original to the wrong thread, my apologies! Sebastian, The only observation I made is in the JIRA notes. Use thread safe collections for the listener lists. There is a bit of overhead, but if you have long running optimizations you might want to connect, get the state of the optimizati

Re: [math] Updating Regression questions..

2011-09-10 Thread Greg Sterijevski
Thanks, -Greg On Sat, Sep 10, 2011 at 4:11 PM, Gilles Sadowski < gil...@harfang.homelinux.org> wrote: > > Wrong ML thread. > > On Sat, Sep 10, 2011 at 03:49:25PM -0500, Greg Sterijevski wrote: > > Sebastian, > > > > The only observation I made i

Re: [math] Updating Regression questions..

2011-09-10 Thread Greg Sterijevski
, 2011 at 1:20 PM, Gilles Sadowski < gil...@harfang.homelinux.org> wrote: > On Sat, Sep 10, 2011 at 01:02:30PM -0500, Greg Sterijevski wrote: > > One more question, if the request list is null, what is the proper > return? A > > null or is an exception returned? > >

Re: [math] Updating Regression questions..

2011-09-10 Thread Greg Sterijevski
One more question, if the request list is null, what is the proper return? A null or is an exception returned? On Sat, Sep 10, 2011 at 12:15 PM, Greg Sterijevski wrote: > Hi All, > > Another mostly exceptional question from me! In the > interface UpdatingMultipleLinearRegression, we

Re: svn commit: r1167451 - in /commons/proper/math/trunk/src: main/java/org/apache/commons/math/stat/regression/SimpleRegression.java test/java/org/apache/commons/math/stat/regression/SimpleRegression

2011-09-10 Thread Greg Sterijevski
Made the changes in my copy, will push them along with the changes to make SimpleRegression compliant with the UpdatingMultipleRegression interface. On Sat, Sep 10, 2011 at 12:29 PM, Greg Sterijevski wrote: > Sorry about the formatting. I looked through checkstyle report and my zeal &

Re: svn commit: r1167451 - in /commons/proper/math/trunk/src: main/java/org/apache/commons/math/stat/regression/SimpleRegression.java test/java/org/apache/commons/math/stat/regression/SimpleRegression

2011-09-10 Thread Greg Sterijevski
Sorry about the formatting. I looked through checkstyle report and my zeal to eliminate extraneous whitespace was only matched by my need to add whitespace around arguments!!! On Sat, Sep 10, 2011 at 10:22 AM, Phil Steitz wrote: > On 9/9/11 9:18 PM, gr...@apache.org wrote: > > Author: gregs > >

[math] Updating Regression questions..

2011-09-10 Thread Greg Sterijevski
Hi All, Another mostly exceptional question from me! In the interface UpdatingMultipleLinearRegression, we have regress() and regress(int[] variablesToInclude). 1. What is the appropriate exception to throw when there is a variable index in the array which does not exist in the data? For example

Re: [jira] [Closed] (MATH-649) SimpleRegression needs the ability to suppress the intercept

2011-09-10 Thread Greg Sterijevski
has been cut. So you sort of > jumped the gun on this one. OK (IMO) to leave this one as is, but > if we want to be tidy, we should reopen and the RESOLVE. > > Phil > > On 9/9/11 9:23 PM, greg sterijevski (JIRA) wrote: > > [ > https://issues.

Re: [math] Documentation

2011-09-09 Thread Greg Sterijevski
Okay, I have begun nibbling on the doc. I will push a few changes I made in connection to doing no intercept regression in SimpleRegression. On Sun, Aug 28, 2011 at 10:17 PM, Phil Steitz wrote: > On 8/28/11 7:24 PM, Greg Sterijevski wrote: > > Hello All, > > > > What tool

Re: [math] MersenneTwister question

2011-09-09 Thread Greg Sterijevski
Added short comment. -Greg On Tue, Aug 30, 2011 at 5:37 AM, sebb wrote: > On 29 August 2011 07:11, Greg Sterijevski wrote: > > My apologies, I was looking at the original c code and neglected to > notice > > the cast. > > Perhaps add a comment to the cast to make it cl

Re: [math] maven build issue

2011-09-09 Thread Greg Sterijevski
than Commons Parent ... because if the > > required version of CP is missing, Math does not know its grandparent > > is the Apache POM. > > > > On 9 September 2011 06:15, Ralph Goers > wrote: > >> FWIW, I built the commons vfs site with Maven 3 and

Re: [math] maven build issue

2011-09-09 Thread Greg Sterijevski
> >> > >> Thank you, > >> > >> -Greg > >> > >> On Thu, Sep 8, 2011 at 11:58 PM, Phil Steitz > wrote: > >> > >>> I know some people have gotten maven 3 to work, but I think most [math] > >>> developers u

Re: [Math] "NonPositiveDefiniteMatrixException" message and meaning

2011-09-09 Thread Greg Sterijevski
Looks good to me. On Fri, Sep 9, 2011 at 6:39 AM, Gilles Sadowski < gil...@harfang.homelinux.org> wrote: > On Thu, Sep 08, 2011 at 04:55:46PM -0700, Ted Dunning wrote: > > OK. > > > > Replace that with the correct value. I meant it to be an index. > > > > That doesn't change my other points. Th

Re: [math] maven build issue

2011-09-08 Thread Greg Sterijevski
That's what I use at least. You might try that. > > Phil > > > > On Sep 8, 2011, at 9:19 PM, Greg Sterijevski > wrote: > > > Hello All, > > > > I am seeing this. My build is on a Mac. Does anyone have any clues? > > > > [ERROR] Failed to execu

[math] maven build issue

2011-09-08 Thread Greg Sterijevski
Hello All, I am seeing this. My build is on a Mac. Does anyone have any clues? [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.0-beta-3:site (default-site) on project commons-math: failed to get Reports: Unable to parse configuration of mojo org.codehaus.mojo:findbugs-

Re: [Math] "NonPositiveDefiniteMatrixException" message and meaning

2011-09-08 Thread Greg Sterijevski
I agree with Ted. You sometimes run into this issue with psuedoinverses. You discover a zero eigenvalue at index i. The user's natural inclination is to attribute it to the corresponding column of the data matrix. -Greg On Thu, Sep 8, 2011 at 6:55 PM, Ted Dunning wrote: > OK. > > Replace that w

Re: [Math] "LUDecomposition" in "AbstractLeastSquaresOptimizer"

2011-09-08 Thread Greg Sterijevski
Gilles, Is the test checked in? I am interested in looking at it. Thank you, -Greg On Thu, Sep 8, 2011 at 2:51 PM, Ted Dunning wrote: > On Thu, Sep 8, 2011 at 12:42 PM, Luc Maisonobe >wrote: > > > ... Luc - are there other reasons that QR would be better for cov > >> matrices? I would have

Re: [Math] "LUDecomposition" in "AbstractLeastSquaresOptimizer"

2011-09-08 Thread Greg Sterijevski
Thu, Sep 8, 2011 at 10:22 AM, Gilles Sadowski < gil...@harfang.homelinux.org> wrote: > On Thu, Sep 08, 2011 at 09:49:12AM -0500, Greg Sterijevski wrote: > > Cholesky, in my opinion, is not robust as you have discovered. When it > > encounters a non-psd matrix it gives up. Mayb

Re: [Math] "LUDecomposition" in "AbstractLeastSquaresOptimizer"

2011-09-08 Thread Greg Sterijevski
Cholesky, in my opinion, is not robust as you have discovered. When it encounters a non-psd matrix it gives up. Maybe that is the correct course of action, but I still think that when you are using the getCovariance to estimate the curvature in the neighborhood of a point it would be okay to take t

Re: [Math] "LUDecomposition" in "AbstractLeastSquaresOptimizer"

2011-09-08 Thread Greg Sterijevski
inverse condition number). On Thu, Sep 8, 2011 at 2:41 AM, Phil Steitz wrote: > On 9/7/11 9:26 PM, Greg Sterijevski wrote: > > I thought that QR is of O(n^3) complexity, while LU is probably in the > > vicinity of O(n^2.5). While this is not a barn burning improvement, it is >

Re: [Math] "LUDecomposition" in "AbstractLeastSquaresOptimizer"

2011-09-07 Thread Greg Sterijevski
, Ted Dunning wrote: > It shouldn't be all that different from QR (at most about 2x different). > > On Wed, Sep 7, 2011 at 1:16 PM, Greg Sterijevski >wrote: > > > It is also my recollection that LU is very quick to calculate. Would it > be > > possible to allow u

Re: [Math] "LUDecomposition" in "AbstractLeastSquaresOptimizer"

2011-09-07 Thread Greg Sterijevski
It is also my recollection that LU is very quick to calculate. Would it be possible to allow users to choose? On Wed, Sep 7, 2011 at 3:07 PM, Ted Dunning wrote: > Does the LUDecomposition not use pivots? LU should always do so since it > is > numerically unstable otherwise. I would be surprise

Re: [math] psychometrics

2011-09-03 Thread Greg Sterijevski
ator requires a multivariate normal (or at least >>> bivariate normal) CDF. I use the one from >>> http://vadim.kutsyy.com/java/**javadoc/com/kutsyy/util/** >>> package-summary.html<http://vadim.kutsyy.com/java/javadoc/com/kutsyy/util/package-summary.html> >>

Re: [math] psychometrics

2011-09-03 Thread Greg Sterijevski
Do you have unit tests written for the different components? On Sat, Sep 3, 2011 at 10:48 AM, Patrick Meyer wrote: > Sounds good. Separating the general purpose stats from the psychometric > specific stats seems like a natural way to distinguish the two libraries. > I'll send a link to the sourc

Re: [math] Multiple Algorithms

2011-09-01 Thread Greg Sterijevski
the old SVD was ditched. Again, not saying it did not deserve it, just wanted to make sure I understood the philosophy behind the decision making. Thank you, -Greg On Thu, Sep 1, 2011 at 1:11 AM, Phil Steitz wrote: > On 8/31/11 10:05 PM, Greg Sterijevski wrote: > > Hello All, >

[math] Multiple Algorithms

2011-08-31 Thread Greg Sterijevski
Hello All, This question popped into my head this evening, what is the right way to handle multiple algorithms which purport to calculate the same thing? There are, for example, a couple of ways to calculate the student t cdf. What is the common's philosophy on deciding: 1. Whether to allow multi

Re: [math] MersenneTwister question

2011-08-30 Thread Greg Sterijevski
Yes, I think this is a good idea. I will do it. On Tue, Aug 30, 2011 at 5:37 AM, sebb wrote: > On 29 August 2011 07:11, Greg Sterijevski wrote: > > My apologies, I was looking at the original c code and neglected to > notice > > the cast. > > Perhaps add a commen

Re: [math] MersenneTwister question

2011-08-28 Thread Greg Sterijevski
My apologies, I was looking at the original c code and neglected to notice the cast. On Mon, Aug 29, 2011 at 12:56 AM, Greg Sterijevski wrote: > Yes, you seem to have a good point. My bad. > > On Mon, Aug 29, 2011 at 12:50 AM, Ted Dunning wrote: > >> Why? >> >> Isn&

Re: [math] MersenneTwister question

2011-08-28 Thread Greg Sterijevski
Yes, you seem to have a good point. My bad. On Mon, Aug 29, 2011 at 12:50 AM, Ted Dunning wrote: > Why? > > Isn't that what casting as an (int) does? > > On Sun, Aug 28, 2011 at 10:17 PM, Greg Sterijevski > wrote: > > > While probably not a big deal, shouldn&#x

[math] MersenneTwister question

2011-08-28 Thread Greg Sterijevski
Hello All, In the MersenneTwister implementation in commons, I notice the following: @Override public void setSeed(int seed) { // we use a long masked by 0xL as a poor man unsigned int long longMT = seed; mt[0]= (int) longMT; for (mti = 1; mti < N;

[math] Documentation

2011-08-28 Thread Greg Sterijevski
Hello All, What tool is used to create the documentation (if one is used at all)? Specifically, I am looking in commons-math/src/site/xdoc/userguide If I wanted to add to the regression portion of stat.xml what is the best way to accomplish this (use vi or some wysiwyg editor)? Thank you, -Greg

Re: [Cache] Status?

2011-08-27 Thread Greg Sterijevski
Thank you David. In all honesty, either JCS or ehcache would be an improvement over the my hackneyed implementation of a cache... ;-) -Greg On Sat, Aug 27, 2011 at 9:14 AM, David Karlsen wrote: > I'd really recommend ehcache. > Den 27. aug. 2011 07:39 skrev "Greg Sterijev

Re: [Cache] Status?

2011-08-26 Thread Greg Sterijevski
effort nowadays. > > Hen > > On Fri, Aug 26, 2011 at 8:55 PM, Greg Sterijevski > wrote: > > Hello, > > > > I was poking around commons and noticed the dormant project Commons > Cache. > > The subversion history shows the last push occurred in 2007. Wha

[Cache] Status?

2011-08-26 Thread Greg Sterijevski
Hello, I was poking around commons and noticed the dormant project Commons Cache. The subversion history shows the last push occurred in 2007. What is the story with the project? Has other java technology supplanted this project? Thanks, -Greg

Re: [math] RealMatrix.set(double)

2011-08-26 Thread Greg Sterijevski
. In the end, I think I see your point, but, its an empirical question as to whether my examples (as archetypes) are more likely to occur in practice versus your example. -Greg On Fri, Aug 26, 2011 at 1:41 PM, Ted Dunning wrote: > On Fri, Aug 26, 2011 at 7:38 AM, Greg Sterijevski >wrot

Re: [math] RealMatrix.set(double)

2011-08-26 Thread Greg Sterijevski
Ted, When you say "Functions are good, but giving a tiny bit more information to the function is also a great idea" do you mean information on indexing and shape of the data? One thought I had, I am not sure if this is 100% applicable is the following: 1. You have two types of data (in matrix

Re: [math] RealMatrix.set(double)

2011-08-24 Thread Greg Sterijevski
Wed, Aug 24, 2011 at 10:44 PM, Phil Steitz wrote: > On 8/24/11 7:27 PM, Greg Sterijevski wrote: > > Before we fill JIRA with a bunch of point-counterpoint comments. Perhaps > we > > can organize our ideas on the list first? > > > > Using Gille's organization: &

Re: [math] RealMatrix.set(double)

2011-08-24 Thread Greg Sterijevski
Before we fill JIRA with a bunch of point-counterpoint comments. Perhaps we can organize our ideas on the list first? Using Gille's organization: * Consistency in naming and make explicit the rationale for choosing one or another naming scheme What methods are inconsistently named? Name the m

Re: [math] SimpleRegression

2011-08-23 Thread Greg Sterijevski
Alright Phil! Thunder and Lightening! I like it. ;-) On Mon, Aug 22, 2011 at 10:55 PM, Phil Steitz wrote: > On 8/22/11 8:42 PM, Greg Sterijevski wrote: > > If no one has objections, I would like to harmonize simpleregression with > > the Regression Interfaces. What is the best

Re: [math] EigenDecompositionImpl

2011-08-23 Thread Greg Sterijevski
Should I open a ticket, or do you want to handle this? On Tue, Aug 23, 2011 at 5:47 PM, Luc Maisonobe wrote: > Le 24/08/2011 00:44, Greg Sterijevski a écrit : > > I understand you want to support the general case, but why should it >> necessitate instantiating a ref. >>

Re: [math] RealMatrix.set(double)

2011-08-23 Thread Greg Sterijevski
Why not use Ted's insight? Instead of a bunch of these "setDiagonal", "setAll", "setFirstN", ... why not just have a set( MatrixFunction mf ). The MatrixFunction delegate could handle whatever we want. It would keep the objects very clean. You could even have a class factory of commonly used Matrix

Re: [math] EigenDecompositionImpl

2011-08-23 Thread Greg Sterijevski
I understand you want to support the general case, but why should it necessitate instantiating a ref. On Tue, Aug 23, 2011 at 5:29 PM, Luc Maisonobe wrote: > Le 23/08/2011 20:45, Greg Sterijevski a écrit : > > Hello All, >> >> Since math gives eigendecomposition for

[math] EigenDecompositionImpl

2011-08-23 Thread Greg Sterijevski
Hello All, Since math gives eigendecomposition for symmetrics, why even allocate the array imagEigenvalues ? What am I missing? Thanks, -Greg

Re: [math] SimpleRegression

2011-08-22 Thread Greg Sterijevski
If no one has objections, I would like to harmonize simpleregression with the Regression Interfaces. What is the best way to proceed? On Sun, Aug 21, 2011 at 9:25 PM, Greg Sterijevski wrote: > Opened a ticket. Submitted patches. -Greg > > > On Sat, Aug 20, 2011 at 4:47 PM, Phil

[Math] TridiagonalTransformer

2011-08-22 Thread Greg Sterijevski
Hello All, In TriaDiagonalTransformer, I notice the following (commencing at line 104). final double[] hK = householderVectors[k - 1]; final double inv = 1.0 / (secondary[k - 1] * hK[k]); cachedQt.setEntry(k, k, 1); if (hK[k] != 0.0

Re: [math] SimpleRegression

2011-08-21 Thread Greg Sterijevski
Opened a ticket. Submitted patches. -Greg On Sat, Aug 20, 2011 at 4:47 PM, Phil Steitz wrote: > On 8/12/11 9:30 PM, Phil Steitz wrote: > > On 8/12/11 7:16 PM, Greg Sterijevski wrote: > >> Hello All, > >> > >> Before I chum the water with more JIRA tickets

Re: [Math] New method: "addToEntry" in "RealVector"

2011-08-17 Thread Greg Sterijevski
Shocking as this may seem! ;-) I like Ted's suggestion. Very clean, an appropriate use of OO and something for which the penalty is not great, but the benefit humongous! +1 for functional/functor approach. On Wed, Aug 17, 2011 at 6:44 PM, Ted Dunning wrote: > Are you going to add addAndScale a

Re: [math] StorelessCovariance

2011-08-17 Thread Greg Sterijevski
I am building in Netbeans and I believe that Luc is correct. I initially had problems until I included the junit.jar. (junit-4.8.2.jar) PS What is your approach to the covariance matrix? Are you building a sum of squares matrix or keeping updates of the mean, ... etc? On Wed, Aug 17, 2011 at 1:2

Re: [Math] "iterator" and "sparseIterator" in "RealVector" hierarchy

2011-08-17 Thread Greg Sterijevski
On symmetrics, diagonal, banded and so on, I disagree-as I have made clear in the past. In the case of White standard errors or panel regressions, you typically have long strings of multiplication by diagonals and symmetrics, sandwich products and so forth. There are enough of these types of operat

Re: [Math] "iterator" and "sparseIterator" in "RealVector" hierarchy

2011-08-15 Thread Greg Sterijevski
Forgive me for pushing my nose under the tent... I couldn't resist. I think Gilles is saying that each specialization of the matrix/vector objects would need to support pre (and post) multiplication with a dense. So the type issue would not be problematic. On Mon, Aug 15, 2011 at 6:34 PM, Ted Dun

Re: [math] SimpleRegression

2011-08-12 Thread Greg Sterijevski
clear javadoc and tests. > > Phil > > > > -Greg > > > > On Sat, Aug 13, 2011 at 12:13 AM, Greg Sterijevski > > wrote: > > > >> One more thing... (ala Detective Colombo). > >> > >> In add and remove observation there is a snippet which looks l

Re: [math] SimpleRegression

2011-08-12 Thread Greg Sterijevski
Also, I was thinking that maybe it might be useful to bring SimpleRegression into line with the other regression techniques and give the user the ability to constrain the constant to zero? -Greg On Sat, Aug 13, 2011 at 12:13 AM, Greg Sterijevski wrote: > One more thing... (ala Detective Colo

Re: [math] SimpleRegression

2011-08-12 Thread Greg Sterijevski
+= dy * dy * fact2; sumXY += dx * dy * fact2; xbar += dx * fact1; ybar += dy * fact1; I realize that most likely the compiler or runtime does this optimization, but just in case... -Greg On Fri, Aug 12, 2011 at 11:40 PM, Greg Sterijevski wrote: > +1 from

  1   2   >