Member-only story

How to use sklearn’s semi-supervised LabelSpreading algorithm

Crystal X
4 min readOct 2, 2022

--

In my most recent post, I discussed how sklearn’s LabelPropagation function can be used to make predictions on partially labelled classification problems. That post can be read here:-

https://tracyrenee61.medium.com/how-to-use-sklearns-semi-supervised-labelpropagation-function-76e50355618d

In this post I intend to discuss sklearn’s LabelSpreading function, which is a sister function to LabelPropagation.

Label spreading is a popular approach to semi-supervised learning. A graph is created that connects examples in the training dataset and propagates known labels through the edges of the graph to label unlabelled examples.

The Label Spreading was introduced by Dengyong Zhou et al in their 2003 paper entitled, ‘Learning with Local and Global Consistency’. The key to semi-supervised learning is the prior assumption of consistency., which means:-

  1. Nearby points are likely to have the same label, and
  2. Points on the same structure, typically referred to as a cluster manifold, are likely to have the same label.

Label spreading is similar to label propagation except that the algorithm uses an affinity matrix normalised graph Laplacian and soft clamping across the labels. In graph theory, the…

--

--

Crystal X
Crystal X

Written by Crystal X

I have over five decades experience in the world of work, being in fast food, the military, business, non-profits, and the healthcare sector.

No responses yet