Hypergeometric Distribution

Discussion in 'Perl Misc' started by makepeace, May 5, 2006.

  1. makepeace

    makepeace Guest

    My task is to find a solution in Perl to the hypergeometric
    distribution function, and to graphically present the results using GD
    and GD::Graph perl modules. The software's to be used as a tool for
    biosecurity and biocontainment. Does anyone know if there's such perl
    code out there? I've found a peace of promissing-looking code at: <a
    href="http://www.sys.eng.net/blog/category/perl" target="_blank">Fun
    with Hypergeometric Distribution Probabilities</a>, but it didn't work
    as expected. (Maybe I didn't use it properly, I admit.)
    <p>
    GD::Graph::lines related question: how do I force the module to start
    plotting the curve from point "0" on the X-axis? It always begins at
    "1".
     
    makepeace, May 5, 2006
    #1
    1. Advertising

  2. makepeace

    Guest

    "makepeace" <> wrote:
    > My task is to find a solution in Perl to the hypergeometric
    > distribution function, and to graphically present the results using GD
    > and GD::Graph perl modules. The software's to be used as a tool for
    > biosecurity and biocontainment.


    I find that somewhat scary. I would prefer that that type of job not
    be a "learn on the job" or "Let's get someone on usenet to do it for me"
    type of thing.

    > Does anyone know if there's such perl
    > code out there?


    GO::TermFinder has some hypergeometric code. I can't comment on it
    efficiency or numerical stability. Generally, I it just math. I doubt
    the implementation in Perl is going have a substantially different
    strategy than an implementation in C or java or whatever.


    > I've found a peace of promissing-looking code at: <a
    > href="http://www.sys.eng.net/blog/category/perl" target="_blank">Fun
    > with Hypergeometric Distribution Probabilities</a>,


    That web page doesn't seem to exist. s/sys.eng/sys-eng/

    > but it didn't work
    > as expected. (Maybe I didn't use it properly, I admit.)


    If you don't tell us what you expected, or what you actually got,
    or how you used it, then how could we possible help you figure out
    what went wrong?

    > <p>
    > GD::Graph::lines related question: how do I force the module to start
    > plotting the curve from point "0" on the X-axis? It always begins at
    > "1".


    You should try to decompose your questions into orthoganal components, but
    for your own use and for posting. People who are interested in GD::Graph
    but not in hypergeometric distribution will likely never see this question!

    Show use the code that makes the curve begin at step "1", and we can
    probably tell you how to make it start at point "0". Without some code
    to go along with it, your description is too vague to be meaningful.

    Xho

    --
    -------------------- http://NewsReader.Com/ --------------------
    Usenet Newsgroup Service $9.95/Month 30GB
     
    , May 5, 2006
    #2
    1. Advertising

  3. makepeace

    makepeace Guest

    It works!

    The code at <http://www.sys-eng.net/blog/category/perl> works like a
    charm. The reason I was not getting correct results was my passing
    parameters to the function in a wrong oder (parameters are position
    dependent).

    Regarding GD::Graph::lines problem, all I needed to do was to use
    numerical X axis, instead of labeled one.

    Jim, I checked GSL and couldn't find anything useful - that's why I
    went to the Web.

    Xho, you're right about decomposing the question for a better public
    use. I was selfish and hasty.

    Thank you, gentlemen, so much for your help. Have a great weekend!

    Makepeace
     
    makepeace, May 5, 2006
    #3
  4. wrote in news:20060505121616.258$:

    > "makepeace" <> wrote:
    >> <p>
    >> GD::Graph::lines related question: how do I force the module to start
    >> plotting the curve from point "0" on the X-axis? It always begins at
    >> "1".


    <various good advice by Xho snipped>

    > Show use the code that makes the curve begin at step "1", and we can
    > probably tell you how to make it start at point "0". Without some
    > code to go along with it, your description is too vague to be
    > meaningful.


    The section titled "Options for graphs with a numerical X axis" in the
    GD::Graph documentation may shed some light here. Basically, GD::Graph is
    not the right tool for XY graphs.

    Sinan

    --
    A. Sinan Unur <>
    (remove .invalid and reverse each component for email address)

    comp.lang.perl.misc guidelines on the WWW:
    http://augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
     
    A. Sinan Unur, May 5, 2006
    #4
  5. makepeace

    makepeace Guest

    Yes, Sinan, the graph I'm getting looks pretty rude, no matter how much
    I tried to beautify it. I would appreciate if you could suggest a
    better solution. Keep in mind that I must deliver generated images to
    browsers.
     
    makepeace, May 5, 2006
    #5
  6. "makepeace" <> wrote in news:1146858144.865445.185370
    @j73g2000cwa.googlegroups.com:

    > Yes, Sinan,


    Apparently you are replying to me. However, you have quoted no context
    which makes it hard for other readers to follow. Please quote some context
    when you post replies.

    > the graph I'm getting looks pretty rude, no matter how much
    > I tried to beautify it. I would appreciate if you could suggest a
    > better solution. Keep in mind that I must deliver generated images to
    > browsers.


    I would use Gnuplot for scientific graphs. Development is active again.

    I have not used it, but there is a module for driving Gnuplot from Perl.

    http://search.cpan.org/~caidaperl/Chart-Graph-2.0/Graph/Gnuplot.pm

    Sinan

    --
    A. Sinan Unur <>
    (remove .invalid and reverse each component for email address)

    comp.lang.perl.misc guidelines on the WWW:
    http://augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
     
    A. Sinan Unur, May 5, 2006
    #6
  7. makepeace

    makepeace Guest

    "A. Sinan Unur" <> wrote in comp.lang.perl.misc
    message ID Xns97BAA07198760asu1cornelledu@127.0.0.1:

    >> the graph I'm getting looks pretty rude, no matter how much
    >> I tried to beautify it. I would appreciate if you could suggest a
    >> better solution. Keep in mind that I must deliver generated images to
    >> browsers.


    > I would use Gnuplot for scientific graphs. Development is active again.


    > I have not used it, but there is a module for driving Gnuplot from Perl.


    > http://search.cpan.org/~caidaperl/Chart-Graph-2.0/Graph/Gnuplot.pm



    Gnuplot seems to be exactly what I need. Thank you very much, Sinan and
    have a great weekend!

    P.S. I hope you'll find my manners a little better now. :)
     
    makepeace, May 5, 2006
    #7
  8. "makepeace" <> wrote in
    news::

    > "A. Sinan Unur" <> wrote in
    > comp.lang.perl.misc message ID
    > Xns97BAA07198760asu1cornelledu@127.0.0.1:
    >
    >>> the graph I'm getting looks pretty rude, no matter how much
    >>> I tried to beautify it. I would appreciate if you could suggest a
    >>> better solution. Keep in mind that I must deliver generated images
    >>> to browsers.

    >
    >> I would use Gnuplot for scientific graphs. Development is active
    >> again.

    >
    >> I have not used it, but there is a module for driving Gnuplot from
    >> Perl.

    >
    >> http://search.cpan.org/~caidaperl/Chart-Graph-2.0/Graph/Gnuplot.pm

    >
    >
    > Gnuplot seems to be exactly what I need. Thank you very much, Sinan
    > and have a great weekend!


    You are most welcome, and you too.

    > P.S. I hope you'll find my manners a little better now. :)


    I am sure we all appreciate the effort. Proper quoting makes it much
    easier to follow discussions, especially for those of us who are
    involved in more than one thread at a time.

    Sinan
    --
    A. Sinan Unur <>
    (remove .invalid and reverse each component for email address)

    comp.lang.perl.misc guidelines on the WWW:
    http://augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
     
    A. Sinan Unur, May 5, 2006
    #8
  9. makepeace

    Dr.Ruud Guest

    A. Sinan Unur schreef:

    > I would use Gnuplot for scientific graphs. Development is active
    > again.


    See also http://www.gnuplot.info

    --
    Affijn, Ruud

    "Gewoon is een tijger."
     
    Dr.Ruud, May 5, 2006
    #9
  10. makepeace

    makepeace Guest

    In article <>,
    "Dr.Ruud" <> wrote:

    >> I would use Gnuplot for scientific graphs. Development is active
    >> again.


    > See also http://www.gnuplot.info


    Thank you, Dr. Ruud. Sorry for the late post.

    Makepeace.
     
    makepeace, May 6, 2006
    #10
  11. makepeace

    zentara Guest

    On 5 May 2006 07:46:43 -0700, "makepeace" <> wrote:

    >My task is to find a solution in Perl to the hypergeometric
    >distribution function, and to graphically present the results using GD
    >and GD::Graph perl modules. The software's to be used as a tool for
    >biosecurity and biocontainment. Does anyone know if there's such perl
    >code out there? I've found a peace of promissing-looking code at: <a
    >href="http://www.sys.eng.net/blog/category/perl" target="_blank">Fun
    >with Hypergeometric Distribution Probabilities</a>, but it didn't work
    >as expected. (Maybe I didn't use it properly, I admit.)
    ><p>
    >GD::Graph::lines related question: how do I force the module to start
    >plotting the curve from point "0" on the X-axis? It always begins at
    >"1".


    Another alternative, is plotting on the Tk::Canvas, which will give you
    alot more flexibility. The Canvas can be exported as a jpeg, png, or
    gif. The drawback is that it needs an X server running.



    --
    I'm not really a human, but I play one on earth.
    http://zentara.net/japh.html
     
    zentara, May 6, 2006
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Oliver Denzel

    Re: C# windows app distribution thru web

    Oliver Denzel, Jul 7, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    1,127
    Oliver Denzel
    Jul 7, 2003
  2. Edwin E. Smith

    MSDE database distribution?

    Edwin E. Smith, Aug 17, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    725
    Edwin E. Smith
    Aug 18, 2005
  3. Raven

    Hypergeometric distribution

    Raven, Dec 26, 2005, in forum: Python
    Replies:
    24
    Views:
    2,682
    Bengt Richter
    Jan 5, 2006
  4. Edward Hua
    Replies:
    2
    Views:
    548
    Thomas Lumley
    Oct 13, 2005
  5. Peter Graf
    Replies:
    1
    Views:
    539
    user923005
    May 21, 2008
Loading...

Share This Page