You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mahout.apache.org by David Hall <dl...@cs.stanford.edu> on 2009/05/23 23:09:25 UTC
Special functions
Hi,
For my project, I need to have an impl of the digamma function:
http://en.wikipedia.org/wiki/Digamma_function
Apache commons math doesn't have it (oddly), so I need to acquire it
from somewhere else.
I trust Radford Neal, who wrote the implementation here:
http://google.com/codesearch/p?hl=en#EbB356_xxkI/fbm.2003-06-29/util/digamma.c
The license seems more than permissive enough...
Alternatively, I can try to track down a book (Numerical Recipes?)
with pseudocode.
-- David
Re: Special functions
Posted by David Hall <dl...@cs.stanford.edu>.
Thanks!
-- David
On Sat, May 23, 2009 at 4:44 PM, Ted Dunning <te...@gmail.com> wrote:
> David,
>
> Actually, I just looked around and didn't see much interesting and cleanly
> available along this line so I just wrote a digamma function.
>
> See https://issues.apache.org/jira/browse/MATH-267 for a tar file containing
> an implementation with test cases. I went ahead and copyrighted this for
> apache use. It contains source, comments and test values derived from
> mathematica.
>
> In the process, I discovered that the R implementation of digamma is really
> crappy for medium small positive values of x.
>
> On Sat, May 23, 2009 at 2:26 PM, David Hall <dl...@cs.stanford.edu> wrote:
>
>> "Share" is too strong. He released a number of functions in the
>> library I linked to, and the only requirement of the license seems to
>> be we maintain the copyright notice and say what we changed:
>>
>> /* Copyright (c) 1995-2003 by Radford M. Neal
>> *
>> * Permission is granted for anyone to copy, use, modify, or distribute
>> this
>> * program and accompanying programs and documents for any purpose,
>> provided
>> * this copyright notice is retained and prominently displayed, along with
>> * a note saying that the original programs are available from Radford
>> Neal's
>> * web page, and note is made of any changes made to the programs. The
>> * programs and documents are distributed without any warranty, express or
>> * implied. As the programs were written for research purposes only, they
>> have
>> * not been tested to the degree that would be advisable in any important
>> * application. All use of these programs is entirely at the user's own
>> risk.
>> */
>>
>> I can also just email him directly.
>>
>> -- David
>>
>>
>> On Sat, May 23, 2009 at 2:22 PM, Ted Dunning <te...@gmail.com>
>> wrote:
>> > Avoid Numerical Recipes if you want to avoid license issues. Their
>> > publisher has a strong history of being very strict about their
>> > interpretation of what they think they own.
>> >
>> > If Radford Neal has an implementation that he would share, I would count
>> > that as a great contribution.
>> >
>> > On Sat, May 23, 2009 at 2:09 PM, David Hall <dl...@cs.stanford.edu>
>> wrote:
>> >
>> >>
>> >> Alternatively, I can try to track down a book (Numerical Recipes?)
>> >> with pseudocode.
>> >
>> >
>> >
>> >
>> > --
>> > Ted Dunning, CTO
>> > DeepDyve
>> >
>>
>
>
>
> --
> Ted Dunning, CTO
> DeepDyve
>
> 111 West Evelyn Ave. Ste. 202
> Sunnyvale, CA 94086
> http://www.deepdyve.com
> 858-414-0013 (m)
> 408-773-0220 (fax)
>
Re: Special functions
Posted by Ted Dunning <te...@gmail.com>.
David,
Actually, I just looked around and didn't see much interesting and cleanly
available along this line so I just wrote a digamma function.
See https://issues.apache.org/jira/browse/MATH-267 for a tar file containing
an implementation with test cases. I went ahead and copyrighted this for
apache use. It contains source, comments and test values derived from
mathematica.
In the process, I discovered that the R implementation of digamma is really
crappy for medium small positive values of x.
On Sat, May 23, 2009 at 2:26 PM, David Hall <dl...@cs.stanford.edu> wrote:
> "Share" is too strong. He released a number of functions in the
> library I linked to, and the only requirement of the license seems to
> be we maintain the copyright notice and say what we changed:
>
> /* Copyright (c) 1995-2003 by Radford M. Neal
> *
> * Permission is granted for anyone to copy, use, modify, or distribute
> this
> * program and accompanying programs and documents for any purpose,
> provided
> * this copyright notice is retained and prominently displayed, along with
> * a note saying that the original programs are available from Radford
> Neal's
> * web page, and note is made of any changes made to the programs. The
> * programs and documents are distributed without any warranty, express or
> * implied. As the programs were written for research purposes only, they
> have
> * not been tested to the degree that would be advisable in any important
> * application. All use of these programs is entirely at the user's own
> risk.
> */
>
> I can also just email him directly.
>
> -- David
>
>
> On Sat, May 23, 2009 at 2:22 PM, Ted Dunning <te...@gmail.com>
> wrote:
> > Avoid Numerical Recipes if you want to avoid license issues. Their
> > publisher has a strong history of being very strict about their
> > interpretation of what they think they own.
> >
> > If Radford Neal has an implementation that he would share, I would count
> > that as a great contribution.
> >
> > On Sat, May 23, 2009 at 2:09 PM, David Hall <dl...@cs.stanford.edu>
> wrote:
> >
> >>
> >> Alternatively, I can try to track down a book (Numerical Recipes?)
> >> with pseudocode.
> >
> >
> >
> >
> > --
> > Ted Dunning, CTO
> > DeepDyve
> >
>
--
Ted Dunning, CTO
DeepDyve
111 West Evelyn Ave. Ste. 202
Sunnyvale, CA 94086
http://www.deepdyve.com
858-414-0013 (m)
408-773-0220 (fax)
Re: Special functions
Posted by Ted Dunning <te...@gmail.com>.
I think that commons math is a useful dependency especially given the recent
conversations with the maintainers of MTJ (they are talking about merging
MTJ into commons.math).
On Sat, May 23, 2009 at 4:45 PM, David Hall <dl...@cs.stanford.edu> wrote:
> Relatedly, I need an implementation of logGamma, which is available in
> apache commons math. Can I add a dependency?
>
>
Re: Special functions
Posted by David Hall <dl...@cs.stanford.edu>.
Relatedly, I need an implementation of logGamma, which is available in
apache commons math. Can I add a dependency?
-- David
On Sat, May 23, 2009 at 2:26 PM, David Hall <dl...@cs.stanford.edu> wrote:
> "Share" is too strong. He released a number of functions in the
> library I linked to, and the only requirement of the license seems to
> be we maintain the copyright notice and say what we changed:
>
> /* Copyright (c) 1995-2003 by Radford M. Neal
> *
> * Permission is granted for anyone to copy, use, modify, or distribute this
> * program and accompanying programs and documents for any purpose, provided
> * this copyright notice is retained and prominently displayed, along with
> * a note saying that the original programs are available from Radford Neal's
> * web page, and note is made of any changes made to the programs. The
> * programs and documents are distributed without any warranty, express or
> * implied. As the programs were written for research purposes only, they have
> * not been tested to the degree that would be advisable in any important
> * application. All use of these programs is entirely at the user's own risk.
> */
>
> I can also just email him directly.
>
> -- David
>
>
> On Sat, May 23, 2009 at 2:22 PM, Ted Dunning <te...@gmail.com> wrote:
>> Avoid Numerical Recipes if you want to avoid license issues. Their
>> publisher has a strong history of being very strict about their
>> interpretation of what they think they own.
>>
>> If Radford Neal has an implementation that he would share, I would count
>> that as a great contribution.
>>
>> On Sat, May 23, 2009 at 2:09 PM, David Hall <dl...@cs.stanford.edu> wrote:
>>
>>>
>>> Alternatively, I can try to track down a book (Numerical Recipes?)
>>> with pseudocode.
>>
>>
>>
>>
>> --
>> Ted Dunning, CTO
>> DeepDyve
>>
>
Re: Special functions
Posted by David Hall <dl...@cs.stanford.edu>.
"Share" is too strong. He released a number of functions in the
library I linked to, and the only requirement of the license seems to
be we maintain the copyright notice and say what we changed:
/* Copyright (c) 1995-2003 by Radford M. Neal
*
* Permission is granted for anyone to copy, use, modify, or distribute this
* program and accompanying programs and documents for any purpose, provided
* this copyright notice is retained and prominently displayed, along with
* a note saying that the original programs are available from Radford Neal's
* web page, and note is made of any changes made to the programs. The
* programs and documents are distributed without any warranty, express or
* implied. As the programs were written for research purposes only, they have
* not been tested to the degree that would be advisable in any important
* application. All use of these programs is entirely at the user's own risk.
*/
I can also just email him directly.
-- David
On Sat, May 23, 2009 at 2:22 PM, Ted Dunning <te...@gmail.com> wrote:
> Avoid Numerical Recipes if you want to avoid license issues. Their
> publisher has a strong history of being very strict about their
> interpretation of what they think they own.
>
> If Radford Neal has an implementation that he would share, I would count
> that as a great contribution.
>
> On Sat, May 23, 2009 at 2:09 PM, David Hall <dl...@cs.stanford.edu> wrote:
>
>>
>> Alternatively, I can try to track down a book (Numerical Recipes?)
>> with pseudocode.
>
>
>
>
> --
> Ted Dunning, CTO
> DeepDyve
>
Re: Special functions
Posted by Ted Dunning <te...@gmail.com>.
Avoid Numerical Recipes if you want to avoid license issues. Their
publisher has a strong history of being very strict about their
interpretation of what they think they own.
If Radford Neal has an implementation that he would share, I would count
that as a great contribution.
On Sat, May 23, 2009 at 2:09 PM, David Hall <dl...@cs.stanford.edu> wrote:
>
> Alternatively, I can try to track down a book (Numerical Recipes?)
> with pseudocode.
--
Ted Dunning, CTO
DeepDyve