scikit-learn LabelPropagation replaces original labels

时间:2016-03-04 17:59:17

标签: python scikit-learn supervised-learning unsupervised-learning

I try to learn scikit-learn and applied the LabelPropagation example for missing labels:

http://scikit-learn.org/stable/auto_examples/semi_supervised/plot_label_propagation_structure.html#example-semi-supervised-plot-label-propagation-structure-py

Adding one "wrong" label to the outer circle by

...
labels     = -np.ones(n_samples)
labels[0]  = outer
labels[1]  = inner
labels[2]  = outer
labels[-1] = inner
...

I get the original label replaced by the other class, even if alpha is set to 1.0. As far as I understood, if alpha is 1.0 none of the original labels will be replaced.

Does anyone understand what happens?

Thanks in advance.

1 个答案:

答案 0 :(得分:0)

LabelSpreading和LabelPropagation最终将在版本0.19中修复