def multi_knee(points: np.ndarray, t1: float = 0.01, t2: int = 4) -> np.ndarray: """Recursive knee point detection based on the menger curvature. It returns the knee points on the curve. Args: points (np.ndarray): numpy array with the points (x, y) t1 (float): coefficient of determination threshold (default 0.01) t2 (int): number of points threshold (default 4) Returns: np.ndarray: knee points on the curve """ return mk.multi_knee(knee, points, t1, t2)
def multi_knee(points, t1=0.99, t2=3): """ Recursive knee point detection based on Kneedle. It returns the knee points on the curve. Args: points (np.ndarray): numpy array with the points (x, y) t1 (float): coefficient of determination threshold (default 0.99) t2 (int): number of points threshold (default 3) Returns: np.ndarray: knee points on the curve """ knees = mk.multi_knee(auto_knee, points, t1, t2) return knees