def lower_bound_yi(X_train, X_test):
    """Compute the "LB_Yi" lower bounds between two datasets.

    Parameters
    ----------
    X_train : array-like, shape = (n_samples_train, n_timestamps)
        Training set.

    X_test: : array-like, shape = (n_samples_test, n_timestamps)
        Test set.

    Returns
    -------
    lower_bounds : array, shape = (n_samples_test, n_samples_train)
        "LB_Yi" lower bounds.

    References
    ----------
    .. [1] B. K. Yi et al, "Efficient Retrieval of Similar Time Sequences
           Under Time Warping". International Conference on Data Engineering,
           201-208 (1998).

    Examples
    --------
    >>> X_train = [[5, 4, 3, 2, 1], [1, 8, 4, 3, 2], [6, 3, 5, 4, 7]]
    >>> X_test = [[2, 1, 8, 4, 5]]
    >>> lower_bound_yi(X_train, X_test)
    array([[3.        , 0.        , 2.44...]])

    """
    X_train = check_array(X_train)
    X_test = check_array(X_test)
    _check_consistent_lengths(X_train, X_test)
    X_train_min = np.min(X_train, axis=1)
    X_train_max = np.max(X_train, axis=1)
    X_test_min = np.min(X_test, axis=1)
    X_test_max = np.max(X_test, axis=1)
    lb_yi = _lower_bound_yi_X_Y(X_test, X_test_min, X_test_max,
                                X_train, X_train_min, X_train_max)
    return lb_yi
Compute the "LB_Yi" lower bounds between two datasets.

    Parameters
    ----------
    X_train : array-like, shape = (n_samples_train, n_timestamps)
        Training set.

    X_test: : array-like, shape = (n_samples_test, n_timestamps)
        Test set.

    Returns
    -------
    lower_bounds : array, shape = (n_samples_test, n_samples_train)
        "LB_Yi" lower bounds.

    References
    ----------
    .. [1] B. K. Yi et al, "Efficient Retrieval of Similar Time Sequences
           Under Time Warping". International Conference on Data Engineering,
           201-208 (1998).

    Examples
    --------
    >>> X_train = [[5, 4, 3, 2, 1], [1, 8, 4, 3, 2], [6, 3, 5, 4, 7]]
    >>> X_test = [[2, 1, 8, 4, 5]]
    >>> lower_bound_yi(X_train, X_test)
    array([[3.        , 0.        , 2.44...]])

    
pyts/metrics/lower_bounds.py