Description Usage Arguments Details Value Author(s) References See Also Examples
sslLabelProp
propagates a few known labels to a large number of unknown labels
according to their proximities to neighboring nodes. It supports many
kinds of distance measurements and graph representations.
1 2 | sslLabelProp(x, y, known.label, graph.type = "exp", dist.type = "Euclidean",
alpha, alpha1, alpha2, k, epsilon, iter = 1000)
|
x |
a n * p matrix or data.frame of n observations and p predictors |
y |
a vector of k known labels. The rows of |
known.label |
a vector indicating the row index of known labels in matrix |
graph.type |
character string; which type of graph should be created? Options
include
|
dist.type |
character string; this parameter controls the type of distance measurement.(see |
alpha |
numeric parameter needed when |
alpha1 |
numeric parameter needed when |
alpha2 |
numeric parameter needed when |
k |
integer parameter needed when |
epsilon |
numeric parameter needed when |
iter |
iteration |
sslLabelProp
implements label propagation algorithm in iter
iterations.It
supports many kinds of distance measurements and four types of graph creations.
a n * 1 vector indicating the predictions of n observations in C class
Junxiang Wang
Xiaojin Zhu(2005),Semi-Supervised Learning with Graphs
1 2 3 4 5 6 7 8 9 10 11 | 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.