skmultilearn.model_selection.measures module¶
-
skmultilearn.model_selection.measures.
example_distribution
(folds, desired_size)[source]¶ Examples Distribution (ED) measure
Examples Distribution is a measure of how much a given fold’s size deviates from the desired number of samples in each of the folds.
-
skmultilearn.model_selection.measures.
folds_label_combination_pairs_without_evidence
(y, folds, order)[source]¶ Fold - Label / Label Pair / Label Combination (FLZ, FLPZ, FLCZ) pair count measure
A general implementation of FLZ - the number of pairs of fold and label combination of a given order for which there is no positive evidence in that fold for that combination. With
order
= 1, it becomes the FLZ measure from Katakis et.al’s original paper, withorder
= 2, it becomes the FLPZ measure from Szymański et. al.’s paper.
-
skmultilearn.model_selection.measures.
folds_without_evidence_for_at_least_one_label_combination
(y, folds, order=1)[source]¶ Counts the number of folds without evidence for a given Label, Label Pair or Label Combination (FZ, FZLP, FZLC) measure
A general implementation of FZ - the number of folds that contain at least one label combination of order
order
with no positive examples. Withorder
= 1, it becomes the FZ measure from Katakis et.al’s original paper.
-
skmultilearn.model_selection.measures.
get_combination_wise_output_matrix
(y, order)[source]¶ Returns label combinations of a given order that are assigned to each row
-
skmultilearn.model_selection.measures.
get_indicator_representation
(row)[source]¶ Convert binary indicator to list of assigned labels
-
skmultilearn.model_selection.measures.
get_unique_combinations
(combinations_per_row)[source]¶ Performs set.union on a list of sets
Parameters: combinations_per_row (List[Set[Tuple[int]]]) – list of combination assignments per row Returns: all unique label combinations Return type: Set[Tuple[int]]
-
skmultilearn.model_selection.measures.
label_combination_distribution
(y, folds, order)[source]¶ Label / Label Pair / Label Combination Distribution (LD, LPD, LCZD) measure
A general implementation of Label / Label Pair / Label Combination Distribution - a measure that evaluates how the proportion of positive evidence for a label / label pair / label combination to the negative evidence for a label (pair/combination) deviates from the same proportion in the entire data set, averaged over all folds and labels.
With
order
= 1, it becomes the LD measure from Katakis et.al’s original paper, withorder
= 2, it becomes the LPD measure from Szymański et. al.’s paper.
-
skmultilearn.model_selection.measures.
percentage_of_label_combinations_without_evidence_per_fold
(y, folds, order)[source]¶ Fold - Label / Label Pair / Label Combination (FLZ, FLPZ, FLCZ) pair count measure
A general implementation of FLZ - the number of pairs of fold and label combination of a given order for which there is no positive evidence in that fold for that combination. With
order
= 1, it becomes the FLZ measure from Katakis et.al’s original paper, withorder
= 2, it becomes the FLPZ measure from Szymański et. al.’s paper.