Learn R Programming

smds (version 1.0)

IMDS: Multidimensional scaling of interval-valued dissimilarities.

Description

Performs MDS for given interval-valued dissimilarities.

Usage

IMDS(IDM, p=2,eps= 1e-5 ,maxit =1000,model=c("sphere","box"), opt.method=c("MM", "BFGS"), ini = "auto",report=100,grad.num=FALSE, rel=0, dil=1)

Arguments

IDM
The interval-valued dissimilarity matrix (an object of class "array": IDM[1,,]: the lower dissmilarity matrix; IDM[2,,]: the upper dissmilarity matrix).
p
Number of dimensions.
eps
Convergence criterion for the majorization minimization algorithm.
maxit
Maximum number of iteretions.
model
If "sphere", then the hypersphere model is used. If "box", then the hyperbox model is used.
opt.method
If "BFGS", then the BFGS method is used for optimizing the stress function. If "MM", then the majorization minimization algortihm is used.
ini
List which consists of an initial center coordinate matrix ini[[1]] and an initial radius vector ini[[2]] (optional). If "auto", then a configuration of the classical MDS for (IDM[1,,]+IDM[2,,])/2 is used as the center coordinate matrix and radii are drawn from the uniform distribution $U(0,1)$.
report
The frequency of reports. Defaults to every 100 iterations.
grad.num
If FALSE, then exact gradient function is used in the BFGS method. If TRUE, then a numerical gradient is used in the BFGS method.
rel
If acc=1, accelerate by the relaxed update. If acc=0, the relaxed update is not used. Not used for the BFGS method. Defaults to 0.
dil
If acc=1, accelerate by the optimal dilation of the configration. If acc=0, the optimal dilation is not used. Not used for the BFGS method. Defaults to 1.

Value

IMDS returns a list with components:
X
The best corrdinate matrix with p columns whose rows give the coordinates of the vertexes.
If model="sphere",
r The best radius vector.
If model="box",
R The best radius matrix with p columns whose rows give the radii of objects.
str
The value of the stress function of IMDS corresponding to X is returned.
str.vec
If "MM", then the vector of values on each iteration is returned.
EIDM
If "MM", then the interval-valued dissimilarity matrix correspondint to the estimated parameters.

Details

The default optimization method is a majorization-minimization algorithm with the optimal dilation. Method "MM" is a majorization-minimization (MM) algortihm for the specified model. If model="box", method "MM" is a MM algorithm, called I-Scal, which is proposed by Groenen et al. (2006). If model="sphere", method "MM" is a MM algorithm which can be considered as I-Scal for the hypersphere model.

Method "BFGS" is a quasi-Newton method (also known as a variable metric algorithm), specifically that published simultaneously in 1970 by Broyden, Fletcher, Goldfarb and Shanno. For more details, see Chapter 15 of Nash (1990).

References

Groenen, P. J. F., Winsberg, S., Rodriguez, O., and Diday, E. (2006). I- scal: Multidimensional scaling of interval dissimilarities. Computational Statistics & Data Analysis, 51, 360--378. Nash, J. C. (1990) Compact Numerical Methods for Computers. Linear Algebra and Function Minimisation. Adam Hilger.

Examples

Run this code
###################
#Fats and Oil data#
###################
###############################
data(oil.idiss)
#Apply the hypersphere model via the BFGS method
set.seed(1)
res.bfgs <- IMDS(IDM=oil.idiss, p=2,model="sphere",opt.method="BFGS", ini = "auto")
plot(res.bfgs,main="Sph_bfgs")
#Apply the hypersphere model via the MM algorithm
set.seed(1)
res.mm <- IMDS(IDM=oil.idiss, p=2,model="sphere",opt.method="MM", ini = "auto")
plot(res.mm,main="Sph_MM")
#Apply the hyperbox model via the BFGS method
set.seed(1)
res.bfgs <- IMDS(IDM=oil.idiss, p=2,model="box",opt.method="BFGS", ini = "auto")
plot(res.bfgs,main="Box_bfgs")
#Apply the hyperbox model via the MM algorithm
set.seed(1)
res.mm <- IMDS(IDM=oil.idiss, p=2,model="box",opt.method="MM", ini = "auto")
plot(res.mm,main="Box_MM")
###############################

Run the code above in your browser using DataLab