Learn R Programming

loe (version 1.1)

SOE: Soft Ordinal Embedding (SOE)

Description

Performs SOE for a given part of ordinal informaiton.

Usage

SOE(CM, N, p = 2, c = 0.1, maxit = 1000, report = 100, iniX = "rand",rnd=10000)

Arguments

CM
A matrix whose rows represent ordinal information: A row vector $(i,j,k,l)$ means $\xi_{ij}
N
The number of objects.
p
The number of dimensions.
c
Scale parameter which only takes strictly positive value.
maxit
Maximum number of iteretions.
report
The frequency of reports. Defaults to every 100 iterations.
iniX
Matrix with starting values for embedding (optional).
rnd
The number of ordinal comarisons which are randomly chosen from given ordinal comparisons CM. rnd is used only if the number of given ordinal comparisons is more than 100000.

Value

  • SOE returns a list with components:
  • XThe best corrdinate matrix with $p$ columns whose rows give the coordinates of objects.
  • strThe value of the stress function of SOE corresponding to X.

Examples

Run this code
library(MASS)
data(eurodist)
OIF <- get.order(as.matrix(eurodist))
sid <- sample(1:nrow(OIF))
POI <- OIF[sid[1:1000],]
result <- SOE(CM=POI, N=nrow(as.matrix(eurodist)),p=2, c=0.1,maxit =1000,report=100)
plot(result$X,type="n",xlab="Dim. 1", ylab="Dim. 2")
text(result$X,rownames(as.matrix(eurodist)),cex=1)

Run the code above in your browser using DataLab