20.181:Materials:HW3 helper: Difference between revisions

From OpenWetWare
Jump to navigationJump to search
No edit summary
 
m (20:181:Materials:HW3 helper moved to 20.181:Materials:HW3 helper: typo on original address)
 
(2 intermediate revisions by the same user not shown)
Line 4: Line 4:
</tt></blockquote>
</tt></blockquote>


*This example tree should give these answers (which hopefully match what you get when you do it by hand and when your code runs with this tree as input)<br>
*Your code, run with this example tree, should give the answers below (which hopefully match what you get when you do it by hand )<br>
<blockquote><tt>
<blockquote><tt>
Average distance: 20.8 <br>
Average distance: 20.8 <br>
Line 11: Line 11:
</tt></blockquote>
</tt></blockquote>
(where I did average distance the equal-weighting way, and the root branch was included)
(where I did average distance the equal-weighting way, and the root branch was included)
(I think if you do it the "phylogenetic-weighting" way the avgDist comes out to 16.75 but I'm too tired to double-check)
(I think if you do it the "phylogenetic-weighting" way the avgDist comes out to 22.375 but I'm too tired to double-check)

Latest revision as of 15:00, 23 September 2006

  • Here is a smaller test tree that you can easily draw by hand (or use the web visualization link). Note that both TreeViewX and the web drawing tool draw the left and right branches from the parent's perspective (looking from the root towards the leaves)

(a:15,((b:2,c:16):3,(d:4,e:5):1):1):10;

  • Your code, run with this example tree, should give the answers below (which hopefully match what you get when you do it by hand )

Average distance: 20.8
Min distance/node [16.0, 'b']
Max distance/node [30.0, 'c']

(where I did average distance the equal-weighting way, and the root branch was included) (I think if you do it the "phylogenetic-weighting" way the avgDist comes out to 22.375 but I'm too tired to double-check)