Brief Introduction of Label Propagation Algorithm
Contents
As I said before, I’m working on a text classification project. I use doc2vec to convert text into vectors, then I use LPA to classify the vectors.
LPA is a simple, effective semi-supervised algorithm. It can use the density of unlabeled data to find a hyperplane to split the data.
Here are the main stop of the algorithm:
- Let be labeled data, are the class labels. Let be unlabeled data where are unobserved, usually . Let where . The problem is to estimate for and .
- Calculate the similarity of the data points. The most simple metric is Euclidean distance. Use a parameter to control the weights.
Larger weight allow labels to travel through easier.
- Define a probabilistic transition matrix
is the probability to jump from node to . If there are classes, we can define a label matrix , to represent the probability of a label belong to class . The initialization of unlabeled data points is not important.
- Propagate
- Row-normalize Y.
- Reset labeled data’s Y. Repeat 3 until Y converges.
In short, let the nearest label has larger weight, then calculate each label’s new label, reset labeled data’s label, repeat.
