Shortcuts

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

Parameters
  • X (ndarray) – input features

  • Y (list) – mixed labels (ints)

  • batch_size (int) – the ultimate batch size

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

Read the Docs v: 0.2.1
Versions
latest
stable
0.2.1
0.2.0
0.1.1
0.1.0
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.