进一步,便可以导入LabelSpreading进行模型训练和测试,代码如下: 1deftest_label_spreding():2x_train,x_test,y_train,y_test,y_mixed=load_data()3ls=LabelSpreading(alpha=0.2)4ls.fit(x_train,y_mixed)5print("Label Spreading")6print(f"训练集上的准确率为:{ls.score(x_train, y_train)}")7print(...