Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Hypergeometric Distribution

Reply
Thread Tools

Hypergeometric Distribution

 
 
makepeace
Guest
Posts: n/a
 
      05-05-2006
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".

 
Reply With Quote
 
 
 
 
xhoster@gmail.com
Guest
Posts: n/a
 
      05-05-2006
"makepeace" <(E-Mail Removed)> 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
 
Reply With Quote
 
 
 
 
makepeace
Guest
Posts: n/a
 
      05-05-2006
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

 
Reply With Quote
 
A. Sinan Unur
Guest
Posts: n/a
 
      05-05-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote in news:20060505121616.258$(E-Mail Removed):

> "makepeace" <(E-Mail Removed)> 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 <(E-Mail Removed)>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://augustmail.com/~tadmc/clpmisc...uidelines.html

 
Reply With Quote
 
makepeace
Guest
Posts: n/a
 
      05-05-2006
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.

 
Reply With Quote
 
A. Sinan Unur
Guest
Posts: n/a
 
      05-05-2006
"makepeace" <(E-Mail Removed)> 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/Ch...aph/Gnuplot.pm

Sinan

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

comp.lang.perl.misc guidelines on the WWW:
http://augustmail.com/~tadmc/clpmisc...uidelines.html

 
Reply With Quote
 
makepeace
Guest
Posts: n/a
 
      05-05-2006
"A. Sinan Unur" <(E-Mail Removed)> 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/Ch...aph/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.

 
Reply With Quote
 
A. Sinan Unur
Guest
Posts: n/a
 
      05-05-2006
"makepeace" <(E-Mail Removed)> wrote in
news:(E-Mail Removed) oups.com:

> "A. Sinan Unur" <(E-Mail Removed)> 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/Ch...aph/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 <(E-Mail Removed)>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://augustmail.com/~tadmc/clpmisc...uidelines.html
 
Reply With Quote
 
Dr.Ruud
Guest
Posts: n/a
 
      05-05-2006
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."


 
Reply With Quote
 
makepeace
Guest
Posts: n/a
 
      05-06-2006
In article <(E-Mail Removed)>,
"Dr.Ruud" <(E-Mail Removed)> 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Numerical Evaluation of the 2F1 hypergeometric function for largeand complex value Peter Graf C Programming 1 05-20-2008 11:47 PM
Hypergeometric distribution Raven Python 24 01-05-2006 09:57 PM
Inverse hypergeometric distribution function written in C? Edward Hua C Programming 2 10-13-2005 10:08 PM



Advertisments