Thanks for the advice William - will take everything on board

On Sun, Sep 5, 2010 at 1:58 PM, William Stein <wst...@gmail.com> wrote:

> On Sat, Sep 4, 2010 at 7:27 PM, Ross Kyprianou <ros...@gmail.com> wrote:
> > +10 Certainly agree that the module is relevant and my work should be
> > interwoven into it
> > It was very timely that you drew my attention to this.
> > I think I should draw up an initial design for the functionality Im
> > aiming for and possibly put it in a new thread for comment.
> >
> > Im happy to do the most of the work for this (its directly relevant to
> > my thesis).
> >
> > I will also look out for (and welcome any news about) other open
> > source code that is relevant.
> > (e.g. Im sure scipy has random number generation for many probability
> > distributions that would be useful, and R certainly comes to mind - I
> > dont want to "reinvent the wheel" and will have to work out what I
> > write anew, what gets called by a wrapper and what gets called
> > directly)
>
> scipy.stats has random number generators for about a 100 different
> families of distributions.   The last time I tried them, they were of
> variable quality, in that some of them were (very, very) slow.  But
> the range of distributions was really impressive.      You should look
> at the official book about numpy (yes, numpy), which Travis Oliphant
> wrote.  It has a pretty good list of the distributions in numpy.stats
> = scipy.stats.
>
> > The primary aim is a probability and stats module/package that has a
> > number of stats primitives like random variables, probability
> > distributions etc available for building algorithms of statistical
> > signal processing (altho my background is maths, my target users are
> > engineers that need to build algorithms easily for tracking,
> > classification etc but only use matlab currently so it will be nice if
> > this plays a small part in making Sage a viable alternative to matlab
> > for these potentially new users :-)
>
> Whatever you do, I hope you'll benchmark carefully as you go.  A
> package that generates random numbers 1000 times slower than MATLAB is
> going to be very annoying to use.  Non-cryptography people usually
> generate random numbers because they want a lot of them.
>
> Here's an example of some code in Sage that's generated a million
> numbers randomly normally distributed in .1 seconds:
>
> sage: time stats.TimeSeries(10^6).randomize('normal', 0, 1)
> CPU times: user 0.10 s, sys: 0.01 s, total: 0.11 s
> Wall time: 0.11 s
> [-1.3444, -0.4416, -1.3075, -0.4803, 0.2128 ... -0.2946, 1.0673,
> -0.5859, -0.0213, 0.1013]
>
> I wrote this from scratch in Cython.
>
> > (Thanks to all for all the help to date)
> >
> > On Sep 5, 10:35 am, kcrisman <kcris...@gmail.com> wrote:
> >> > (If youre into Probability and Statistics: Ive defined a Random
> >> > Variable class and for any instance X, the expressions exp(X) or
> >> > log(X) (or F(X) for any real function F) are well-defined random
> >> > variables and should be returned as new instances defined in terms of
> >> > X - but ignore this if youre not into Prob&Stats).
> >>
> >> This isn't relevant to the main point of this thread, but is this at
> >> all connected to the already existing module below?  I at one point
> >> started to improve the documentation of this but didn't have many good
> >> examples of its intended use.  Anyway, probably your thing should be
> >> interwoven with this somehow.
> >>
> >> - kcrisman
> >>
> >> sage: sage.probability.random_variable?
> >> Type:           module
> >> Base Class:     <type 'module'>
> >> String Form:    <module 'sage.probability.random_variable' from '/mnt/
> >> usb1/scratch/kcrisman/sage-4.5.2.rc1-sage.m <...> hington.edu-x86_64-
> >> Linux/local/lib/python2.6/site-packages/sage/probability/
> >> random_variable.pyc'>
> >> Namespace:      Interactive
> >> File:           /mnt/usb1/scratch/kcrisman/sage-4.5.2.rc1-
> >> sage.math.washington.edu-x86_64-Linux/local/lib/python2.6/site-
> >> packages/sage/probability/random_variable.py
> >> Docstring:
> >>     Random variables and probability spaces
> >>
> >>     This introduces a class of random variables, with the focus on
> >>     discrete random variables (i.e. on a discrete probability space).
> >> This
> >>     avoids the problem of defining a measure space and measurable
> >>     functions.
> >
> > --
> > To post to this group, send an email to sage-devel@googlegroups.com
> > To unsubscribe from this group, send an email to
> sage-devel+unsubscr...@googlegroups.com<sage-devel%2bunsubscr...@googlegroups.com>
> > For more options, visit this group at
> http://groups.google.com/group/sage-devel
> > URL: http://www.sagemath.org
> >
>
>
>
> --
> William Stein
> Professor of Mathematics
> University of Washington
> http://wstein.org
>
> --
> To post to this group, send an email to sage-devel@googlegroups.com
> To unsubscribe from this group, send an email to
> sage-devel+unsubscr...@googlegroups.com<sage-devel%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org
>

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to