data(iris)
x<-iris[,1:4]
#Suppose we know the first twenty observations of each class and we want to propagate
#these labels to unlabeled data.
# 1 setosa, 2 versicolor, 3 virginica
y<-rep(1:3,each =20)
known.label <-c(1:20,51:70,101:120)
f1<-sslLabelProp(x,y,known.label,graph.type="enn",epsilon = 0.5)
f2<-sslLabelProp(x,y,known.label,graph.type="knn",k =10)
f3<-sslLabelProp(x,y,known.label,graph.type="tanh",alpha1=-2,alpha2=1)
f4<-sslLabelProp(x,y,known.label,graph.type="exp",alpha = 1)
Run the code above in your browser using DataLab