"ranking"(x, y, kernel ="rbfdot", kpar = list(sigma = 1), scale = FALSE, alpha = 0.99, iterations = 600, edgegraph = FALSE, convergence = FALSE ,...)
"ranking"(x, y, alpha = 0.99, iterations = 600, convergence = FALSE,...)
"ranking"(x, y, kernel = "stringdot", kpar = list(length = 4, lambda = 0.5), alpha = 0.99, iterations = 600, convergence = FALSE, ...)
rbfdot
Radial Basis kernel function "Gaussian"
polydot
Polynomial kernel function
vanilladot
Linear kernel function
tanhdot
Hyperbolic tangent kernel function
laplacedot
Laplacian kernel function
besseldot
Bessel kernel function
anovadot
ANOVA RBF kernel function
splinedot
Spline kernel
The kernel parameter can also be set to a user defined function of class kernel by passing the function name as an argument.
sigma
inverse kernel width for the Radial Basis
kernel function "rbfdot" and the Laplacian kernel "laplacedot".
degree, scale, offset
for the Polynomial kernel "polydot"
scale, offset
for the Hyperbolic tangent kernel
function "tanhdot"
sigma, order, degree
for the Bessel kernel "besseldot".
sigma, degree
for the ANOVA kernel "anovadot".
Hyper-parameters for user defined kernels can be passed through the kpar parameter as well.
alpha
parameter takes values between 0 and 1
and is used to control the authoritative scores received from the
unlabeled points. For 0 no global structure is found the algorithm
ranks the points similarly to the original distance metric.ranking
which extends the matrix
class.
The first column of the returned matrix contains the original index of
the points in the data matrix the second column contains the final
score received by each point and the third column the ranking of the point.
The object contains the following slots :
ranking-class
, specc
data(spirals)
## create data from spirals
ran <- spirals[rowSums(abs(spirals) < 0.55) == 2,]
## rank points according to similarity to the most upper left point
ranked <- ranking(ran, 54, kernel = "rbfdot",
kpar = list(sigma = 100), edgegraph = TRUE)
ranked[54, 2] <- max(ranked[-54, 2])
c<-1:86
op <- par(mfrow = c(1, 2),pty="s")
plot(ran)
plot(ran, cex=c[ranked[,3]]/40)
Run the code above in your browser using DataLab