Hi,
I have check the similarity values between two sequences (values). Absoultely in bioinformatics.. still I couldn't able to find out the exact behaviour of this
When you run the example,
#!c:\perl\bin\perl
use strict;
use warnings;
use Statistics::Shannon;
use Data::Dumper;
my @data1=(1,3,2,4,6);
my @data2=(2,3,2,3,6);
my $data=[(@data1,@data2)];
my $base_index=2;
my $shannon=Statistics::Shannon->new($data,$base_index);
my $output=$shannon->index;
print Dumper($shannon);
__OUTPUT___
$VAR1 = bless( {
'shannon' => {
'2.71828182845905' => '1.4681399390162
+1'
},
'min' => 1,
'max' => 4,
'data' => {
'6' => 2,
'4' => 1,
'1' => 1,
'3' => 3,
'2' => 4
},
'update' => sub { "DUMMY" },
'sum' => 11
}, 'Statistics::Shannon' );
I got this result.
if you look into the perldoc of
Statistics::Shannon ,
It says that
$base_index denoted for the logerthemic specification. But the dumer output denotes that
$base_index also added up with the data and hence it shows
'2' => 4 { 4 denotes the count of value '2' in the list } .
Anyone can please help me out ??.
-kulls
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.