polliwog/plane/plane.py
def fit_from_points(cls, points):
        """
        Fits a plane whose normal is orthgonal to the first two principal axes
        of variation in the data and centered on the points' centroid.
        """
        vg.shape.check(locals(), "points", (-1, 3))
        eigval, eigvec = np.linalg.eig(np.cov(points.T))
        ordering = np.argsort(eigval)[::-1]
        normal = np.cross(eigvec[:, ordering[0]], eigvec[:, ordering[1]])
        return cls(points.mean(axis=0), normal)

        Fits a plane whose normal is orthgonal to the first two principal axes
        of variation in the data and centered on the points' centroid.
        
Fits a plane whose normal is orthgonal to the first two principal axes
of variation in the data and centered on the points' centroid.
Fits a plane whose normal is orthgonal to the first two principal axes of variation in the data and centered on the points ' centroid .
def fit_from_points(cls, points):
        vg.shape.check(locals(), "points", (-1, 3))
        eigval, eigvec = np.linalg.eig(np.cov(points.T))
        ordering = np.argsort(eigval)[::-1]
        normal = np.cross(eigvec[:, ordering[0]], eigvec[:, ordering[1]])
        return cls(points.mean(axis=0), normal)
def fit_from_points ( cls , points ) : vg . shape . check ( locals ( ) , "points" , ( - 1 , 3 ) ) eigval , eigvec = np . linalg . eig ( np . cov ( points . T ) ) ordering = np . argsort ( eigval ) [ : : - 1 ] normal = np . cross ( eigvec [ : , ordering [ 0 ] ] , eigvec [ : , ordering [ 1 ] ] ) return cls ( points . mean ( axis = 0 ) , normal )
Fits a plane whose normal is orthgonal to the first two principal axes
of variation in the data and centered on the points' centroid.
Fits a plane whose normal is orthgonal to the first two principal axes of variation in the data and centered on the points ' centroid .
"""
        Fits a plane whose normal is orthgonal to the first two principal axes
        of variation in the data and centered on the points' centroid.
        """
cls
points