elbow-0.2.0.0: Find the elbow point.

Safe HaskellNone
LanguageHaskell2010

Math.Elbow

Synopsis

Documentation

findElbow :: (RealFloat a, Numeric a) => MinMax -> Matrix a -> Maybe (Int, (a, a)) Source #

Get the elbow point (and its index) of a two-dimensional distribution. Uses the Max or Min to identify convex / concave point, depending on the choice (for positive x and y, top left hump would be Max, bottom right dip would be Min). Matrix rows are observations, columns are dimensions.

findElbowList :: (RealFloat a, Numeric a) => MinMax -> [[a]] -> Maybe (Int, (a, a)) Source #

Get the elbow point (and its index) of a two-dimensional distribution. Uses the Max or Min to identify convex / concave point, depending on the choice (for positive x and y, top left hump would be Max, bottom right dip would be Min). Matrix rows are observations, columns are dimensions. List of columns.

getRotationAngle :: (RealFloat a, Numeric a) => Matrix a -> Maybe a Source #

Use the minimum and maximum points to identify the appropriate rotation in radians. Matrix rows are observations, columns are dimensions.

data MinMax Source #

Constructors

Min 
Max 
Instances
Read MinMax Source # 
Instance details

Defined in Math.Elbow

Show MinMax Source # 
Instance details

Defined in Math.Elbow