Semi-supervised learning¶
Collection of utilities for semi-supervised learning where some part of the data is labeled and the other part is not.
Balanced classes¶
Example:
from pl_bolts.utils.semi_supervised import balance_classes
-
pl_bolts.utils.semi_supervised.
balance_classes
(X, Y, batch_size)[source] Makes sure each batch has an equal amount of data from each class. Perfect balance.
half labeled batches¶
Example:
from pl_bolts.utils.semi_supervised import balance_classes
-
pl_bolts.utils.semi_supervised.
generate_half_labeled_batches
(smaller_set_X, smaller_set_Y, larger_set_X, larger_set_Y, batch_size)[source] Given a labeled dataset and an unlabeled dataset, this function generates a joint pair where half the batches are labeled and the other half is not.