#11572: Add new continuous probabillity dsitributions
---------------------------+------------------------------------------------
Reporter: Kamhamea | Owner: amhou
Type: enhancement | Status: new
Priority: major | Milestone: sage-4.7.2
Component: statistics | Keywords:
Work_issues: | Upstream: N/A
Reviewer: | Author: Mato Nagel
Merged: | Dependencies:
---------------------------+------------------------------------------------
Old description:
> There is a list of probability distributions available on GSL that have
> been wrapped into sage
New description:
There are many continuous probability distributions available on GSL that
have not yet been wrapped into Sage. This ticket is for doing this.
--
Comment(by kcrisman):
Replying to [comment:3 Kamhamea]:
> > you seem to have subsumed the patch at #9080 in this patch. You
should instead apply that patch to your Sage, and then create your new
patch on top of that one.
>
> Well, that's exactly what I did. Only I transferred the changes of that
patch into my patch by my merge software line by line. It is not the way
it is meant to be done, is it?
The way I do it is to do
{{{
sage: hg_sage.import_patch("The original patch name.patch")
}}}
Then do my own changes, then do
{{{
sage: hg_sage.diff() # gives me all the changes I've made to look at
sage: hg_sage.ci() # I "commit" the patch
sage: hg_sage.export(tip,"name I want to give the new patch")
}}}
This allows the original patch to stay the same. I ''strongly'' suggest
reading the
[http://www.sagemath.org/doc/developer/walk_through.html#submitting-a-change
Sage development guide]; it is pretty comprehensive, because we have so
many new contributors.
> I'm quite unfamiliar with mercurial version control system. So to say
I'm unable to rewind that patch. Of course I didn't meant to spoil the
credits of patch #9080 developer. As you can see I didn't change his name
in the header.
No, of course you didn't. It takes a while to get used to this, for sure.
You can do
{{{
sage: hg_sage.rollback()
sage: hg_sage.revert(options="--all")
}}}
to undo your patch. Then you can reimport the other patch correctly, then
start making your changes again.
> To be honest I don't know exactly what is meant by that. Please give
some example. but you'd better do that at #11514.
Yes, you are right.
> > More substantively, I think (my opinion only) that based on the
[http://groups.google.com/group/sage-
devel/browse_thread/thread/8febda1b92330c85/9cea7249b186d8e5 discussion
about this on sage-devel], the binomial and other "discrete" distributions
should somehow be separated, if only for user convenience.
>
> This needs rethinking. Two points to mention:
>
> 1. From a programmers perspective, it is too much redundancy. The
implementation of discrete and continuous distribution is almost the same
except plotting. Well we can create a base class that implements all
functionality except plotting and help. Still I believe its superfluous
work.
This is exactly what is done for most Sage modules. We create a base
class that does everything that is the same, and then rewrite or overload
methods that are different. That would be fine. What I think would be
not so good is to try to do the same thing for discrete distributions as
for continuous ones, because there should be some differences. Unless you
can find a way to preserve backward compatibility while doing R's pattern.
But that could be a different ticket. Better to get this new and useful
functionality in, rather than have a long discussion and then a year from
now people still can't use all these GSL distributions easily wrapped!
> 2. From a user perspective, especially a newcommer's, it is not likely
that he/she knows, for instance, that binomial distribution is a discrete
one and that an other class has to be used. So we may create frustration
at this end too. Besides R doesn't make the distinction either
If someone doesn't know this, they perhaps shouldn't be using probability
distributions! More seriously, the best way to deal with this is good
documentation at the top of the file, so that it is easy to find in the
reference manual.
----
How about this. Can we make this ticket be about adding new continuous
distributions (so not binomial), and then continue the discussion about
the rest on a different ticket? I feel like the consensus on sage-devel
was in having this mathematically-inspired distinction, but it shouldn't
hold up getting in the new distributions. At that location we can also
discuss what these things should be named.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11572#comment:5>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.