(index, X, y, unknown_element=0)
return X[ins_index, :], label_matrix, ins_index
get data matrix by giving the indexes of known instance-label pairs in multi-label setting.

    Note:
    Each index should be a tuple, with the first element representing instance index.
    e.g.
    queried_index = (1, [3,4])  # 1st instance, 3rd,4th labels
    queried_index = (1, [3])    # 1st instance, 3rd labels
    queried_index = (1, 3)
    queried_index = (1, (3))
    queried_index = (1, (3,4))
    queried_index = (1, )   # query all labels

    Parameters
    ----------
    index: {list, np.ndarray, tuple, MultiLabelIndexCollection}
        The indexes of known instance-label pairs.
        if only one index, a tuple is expected.
        Otherwise, it should be a list type with n tuples or MultiLabelIndexCollection object.

    X:  array-like
        array with [n_samples, n_features].

    y:  array-like
        array with [n_samples, n_classes].

    unknown_element: object
        value to fill up the unknown part of the matrix_clip.

    Returns
    -------
    X_clip: np.ndarray
        Data matrix of the retrieved data.

    y_clip: np.ndarray
        Label matrix of the retrieved data.

    ins_index: np.ndarray
        Index of each retrieved data.
get data matrix by giving the indexes of known instance-label pairs in multi-label setting.
get data matrix by giving the indexes of known instance - label pairs in multi - label setting .
def get_Xy_in_multilabel(index, X, y, unknown_element=0):
    """get data matrix by giving the indexes of known instance-label pairs in multi-label setting.

    Note:
    Each index should be a tuple, with the first element representing instance index.
    e.g.
    queried_index = (1, [3,4])  # 1st instance, 3rd,4th labels
    queried_index = (1, [3])    # 1st instance, 3rd labels
    queried_index = (1, 3)
    queried_index = (1, (3))
    queried_index = (1, (3,4))
    queried_index = (1, )   # query all labels

    Parameters
    ----------
    index: {list, np.ndarray, tuple, MultiLabelIndexCollection}
        The indexes of known instance-label pairs.
        if only one index, a tuple is expected.
        Otherwise, it should be a list type with n tuples or MultiLabelIndexCollection object.

    X:  array-like
        array with [n_samples, n_features].

    y:  array-like
        array with [n_samples, n_classes].

    unknown_element: object
        value to fill up the unknown part of the matrix_clip.

    Returns
    -------
    X_clip: np.ndarray
        Data matrix of the retrieved data.

    y_clip: np.ndarray
        Label matrix of the retrieved data.

    ins_index: np.ndarray
        Index of each retrieved data.
    """
    # check validity
    X = check_matrix(X)
    if not len(X) == len(y):
        raise ValueError("Different length of instances and labels found.")

    label_matrix, ins_index = get_labelmatrix_in_multilabel(index, y, unknown_element=unknown_element)
    return X[ins_index, :], label_matrix, ins_index
def get_Xy_in_multilabel ( index , X , y , unknown_element = 0 ) : # check validity X = check_matrix ( X ) if not len ( X ) == len ( y ) : raise ValueError ( "Different length of instances and labels found." ) label_matrix , ins_index = get_labelmatrix_in_multilabel ( index , y , unknown_element = unknown_element ) return X [ ins_index , : ] , label_matrix , ins_index