scikitlearn LabelPropagation取代原始标签

2024-06-17 12:26:37 发布

您现在位置:Python中文网/ 问答频道 /正文

我尝试学习scikit learn,并将LabelPropagation示例应用于缺失标签:

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

在外圈添加一个“错误”标签

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

即使alpha设置为1.0,原始标签也会被另一个类替换。据我所知,如果alpha为1.0,所有原始标签都不会被替换。在

有人知道发生了什么吗?在

提前谢谢。在


Tags: alpha示例labelsplot标签scikitstructurelearn