biocore / Evident-initial-demo

Elucidating sampling effort for microbial analysis studies
7 stars 12 forks source link

Ellipse validity #9

Closed meganap closed 12 years ago

meganap commented 12 years ago

Make sure that the 3d ellipses are correct

wdwvt1 commented 12 years ago

the ellipses are not valid. Antonio and I decided that I would change the documentation to reflect what the ellipses are actually displaying. Ultimately an implementation of spanning ellipses or convex hulls will be necessary.

wdwvt1 commented 12 years ago

documentation update for get_pcoa_ellipsoid_coords:

The ellipsoids that are calculated by this function are NOT minimum spanning ellipsoids. This function looks at all the iterations for a given sample and the calculates the center and max distance from the center of each of those iterations along each individual axis. While this ensures that the most extreme points on any given axis are contained within the ellipse it isn't guaranteed that every point will be contained. As an example, circumscribe a rectangle about an ellipse so that the ellipse and rectangle are co-linear at 4 points (i.e. rectangle is just big enough to contain the ellipse). Take a corner of the rectangle and move it towards the center of the ellipse so that its x and y components diminish in magnitude. This new point will not be contained within the ellipse, but its x and y coordinates will be less extreme than the most extreme points of the ellipse (the points that are colinear with the minor and major axis.)