kulls has asked for the wisdom of the Perl Monks concerning the following question:
Thanks, -kulls#!c:\perl\bin\perl use strict; use warnings; use Statistics::Shannon; use Data::Dumper; my $data1=[3,1,3,2,3]; my $data2=[4,1,3,2,3]; my $base_index=2; my $shannon1=Statistics::Shannon->new($data1,$base_index); my $shannon2=Statistics::Shannon->new($data2,$base_index); my $output1=$shannon1->index; my $output2=$shannon2->index; print $output1."\t".$output2; print "\tNot match" if( $output2 != $output1);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Shannon Index
by GrandFather (Saint) on Sep 04, 2006 at 19:15 UTC | |
by kulls (Hermit) on Sep 06, 2006 at 04:30 UTC | |
by GrandFather (Saint) on Sep 06, 2006 at 05:04 UTC | |
by kulls (Hermit) on Sep 12, 2006 at 12:06 UTC | |
by GrandFather (Saint) on Sep 12, 2006 at 20:42 UTC | |
|