Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Machine Learning by (19k points)

When using LabelPropagation, I often run into this warning (imho it should be an error because it completely fails the propagation):

So after few tries with the RBF kernel, I discovered the parameter gamma has an influence.

The problem comes from these lines:

        if self._variant == 'propagation':

            normalizer = np.sum(

                self.label_distributions_, axis=1)[:, np.newaxis]

            self.label_distributions_ /= normalizer

I don't get how label_distributions_ can be all zeros, especially when its definition is:

self.label_distributions_ = safe_sparse_dot(

graph_matrix, self.label_distributions_)

Gamma has an influence on the graph_matrix (because graph_matrix is the result of _build_graph() that call the kernel function). OK. But still. Something's wrong

1 Answer

0 votes
by (33.1k points)

It seems you have such large gamma values makes me wonder if you are using gamma = D.min()/3, which would be incorrect. The definition is sigma = D.min()/3 while the definition of sigma in w is

w = exp(-d**2/sigma**2)  

which would make the correct gamma value 1/sigma**2 or 9/D.min()**2. Thus, master the topic, go through Machine Learning Course.

Also, Machine Learning Algorithms would be quite essential for a better understanding.

Browse Categories

...