sslRegress: Regression on graphs

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/SSL.R

Description

sslRegress develops a regularization framework on graphs.It supports many kinds of distance measurements and graph representations. However, it only supports binary classifications.

Usage

1
2
sslRegress(xl, yl, xu, graph.type = "exp", dist.type = "Euclidean", alpha,
  alpha1, alpha2, p = 2, method = "Tikhonov", gamma = 1)

Arguments

xl

a n * p matrix or data.frame of labeled data.

yl

a n * 1 binary labels(1 or -1).

xu

a m * p matrix or data.frame of unlabeled data.

graph.type

character string; which type of graph should be created? Options includetanh and exp.

  • tanh:tanh-weighted graphs. w(i,j) = (tanh(alpha1(d(i,j) - alpha2)) + 1)/2.where d(i,j) denotes the distance between point i and j. Hyperparameters alpha1 and alpha2 control the slope and cutoff value respectively.

  • exp :exp-weighted graphs.w(i,j) = exp(-d(i,j)^2/alpha^2),where d(i,j) denotes the distance between point i and j. Hyperparameter alpha controls the decay rate.

dist.type

character string; this parameter controls the type of distance measurement.(see dist or pr_DB).

alpha

numeric parameter needed when graph.type = exp

alpha1

numeric parameter needed when graph.type = tanh

alpha2

numeric parameter needed when graph.type = tanh

p

an ineger parameter controls the power of Laplacian for regularization.

method

character string; this parameter choose two possible algorithms:"Tikhonov" means Tikhonov regularization;"Interpolated" means Interpolated regularization.

gamma

a parameter of Tikhonov regularization.

Value

a m * 1 integer vector representing the predicted labels of unlabeled data(1 or -1).

Author(s)

Junxiang Wang

References

Belkin, M., Matveeva, I., & Niyogi, P. (2004a). Regularization and semisupervised learning on large graphs. COLT

See Also

pr_DB dist

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(iris)
xl<-iris[c(1:20,51:70),-5]
xu<-iris[c(21:50,71:100),-5]
yl<-rep(c(1,-1),each=20)
# Tikhonov regularization
yu1<-sslRegress(xl,yl,xu,graph.type="tanh",alpha1=-2,alpha2=1)
yu2<-sslRegress(xl,yl,xu,graph.type="exp",alpha = 1)
# Interpolated regularization
yu3<-sslRegress(xl,yl,xu,graph.type="tanh",alpha1=-2,alpha2=1,method="Interpolated")
yu4<-sslRegress(xl,yl,xu,graph.type="exp",alpha = 1,method="Interpolated")

SSL documentation built on May 29, 2017, 7:14 p.m.

Related to sslRegress in SSL...