Learn R Programming

SSL (version 0.1)

sslLLGC: Local and Global Consistency

Description

Local and Global Consistency

Usage

sslLLGC(xl, yl, xu, dist.type = "Euclidean", alpha = 0.01, gamma = 1, iter = 1000)

Arguments

xl
a n * p matrix or data.frame of labeled data
yl
a n X C matrix representing labels of n observations in C classes.If observation i belongs to class j, then yl(i,j)=1, and other elements in the same row equal 0.
xu
a m * p matrix or data.frame of unlabeled data.
dist.type
character string; this parameter controls the type of distance measurement.(see dist or pr_DB).
alpha
a numeric parameter controls convergence rate.
gamma
a numeric parameter in the affinity matrix
iter
the number of iteration.

Value

a m * 1 integer vector representing the predicted labels of unlabeled data.

References

Zhou, D., Bousquet, O., Lal, T., Weston, J. and Scholkopf, B. (2004). Learning with local and global consistency.

See Also

pr_DB dist

Examples

Run this code
data(iris)
xl<-iris[c(1:20,51:70,101:120),-5]
yl<-matrix(0,ncol=3,nrow=60)
yl[1:20,1]<-1
yl[21:40,2]<-1
yl[41:60,3]<-1
xu<-iris[-c(1:20,51:70,101:120),-5]
yu<-sslLLGC(xl,yl,xu)

Run the code above in your browser using DataLab