R: Description of the dissimilarities between women's trunks
descrDissTrunks
R Documentation
Description of the dissimilarities between women's trunks
Description
Unlike archetypes, archetypoids can be computed when features are unavailable. Given a dissimilarity matrix, the classical multidimensional scaling (cMDS) can be applied to obtain a description of the dissimilarities.
In Vinue et al. (2015), the dissimilarity matrix represents the dissimilarities between women's trunks. After applying the cMDS, the database described here is obtained. Then, the archetypoid algorithm can be applied to this database, see section examples.
Usage
descrDissTrunks
Format
A matrix with 470 rows and 4 columns.
Source
Anthropometric survey of the Spanish female population.
References
Vinue, G., Epifanio, I., and Alemany, S., (2015). Archetypoids: a new approach to define representative archetypal data, Computational Statistics and Data Analysis87, 102–115.
Alemany, S., Gonzalez, J. C., Nacher, B., Soriano, C., Arnaiz, C., and Heras, H., (2010). Anthropometric survey of the Spanish female population aimed at the apparel industry. Proceedings of the 2010 Intl. Conference on 3D Body scanning Technologies, 307–315.
Examples
#Database:
#As a toy example, only the first 25 individuals are used.
X <- descrDissTrunks[1:25,]
X <- as.matrix(X)
#Computation of archetypes and archetypoids:
#For reproducing results, seed for randomness:
set.seed(2010)
#Run archetype algorithm repeatedly from 1 to numArch archetypes:
#This is a toy example. In other situation, choose numArch=10 and numRep=20.
numArch <- 5 ; nrep <- 2
lass <- stepArchetypesRawData(data = X, numArch = 1:numArch, numRep = nrep, verbose = FALSE)
#To understand the warning messages, see the vignette of the
#archetypes package.
#screeplot(lass)
numArchoid <- 3
res_archoids_ns <- archetypoids(numArchoid, X, huge = 200, step = FALSE, ArchObj = lass,
nearest = "cand_ns", sequ = TRUE)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(Anthropometry)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/Anthropometry/descrDissTrunks.Rd_%03d_medium.png", width=480, height=480)
> ### Name: descrDissTrunks
> ### Title: Description of the dissimilarities between women's trunks
> ### Aliases: descrDissTrunks
> ### Keywords: datasets
>
> ### ** Examples
>
> #Database:
> #As a toy example, only the first 25 individuals are used.
> X <- descrDissTrunks[1:25,]
> X <- as.matrix(X)
>
> #Computation of archetypes and archetypoids:
> #For reproducing results, seed for randomness:
> set.seed(2010)
> #Run archetype algorithm repeatedly from 1 to numArch archetypes:
> #This is a toy example. In other situation, choose numArch=10 and numRep=20.
> numArch <- 5 ; nrep <- 2
> lass <- stepArchetypesRawData(data = X, numArch = 1:numArch, numRep = nrep, verbose = FALSE)
Warning messages:
1: In archetypes(data, k = numArch[i], family = archetypesFamily("original", :
k=2: zs > maxKappa
2: In archetypes(data, k = numArch[i], family = archetypesFamily("original", :
k=2: zs > maxKappa
3: In archetypes(data, k = numArch[i], family = archetypesFamily("original", :
k=3: zs > maxKappa
4: In archetypes(data, k = numArch[i], family = archetypesFamily("original", :
k=3: Error in qr.solve(alphas %*% t(alphas)): singular matrix 'a' in solve
5: In archetypes(data, k = numArch[i], family = archetypesFamily("original", :
k=4: zs > maxKappa
6: In archetypes(data, k = numArch[i], family = archetypesFamily("original", :
k=4: zs > maxKappa
7: In archetypes(data, k = numArch[i], family = archetypesFamily("original", :
k=5: zs > maxKappa
8: In archetypes(data, k = numArch[i], family = archetypesFamily("original", :
k=5: zs > maxKappa
> #To understand the warning messages, see the vignette of the
> #archetypes package.
>
> #screeplot(lass)
>
> numArchoid <- 3
> res_archoids_ns <- archetypoids(numArchoid, X, huge = 200, step = FALSE, ArchObj = lass,
+ nearest = "cand_ns", sequ = TRUE)
>
>
>
>
>
> dev.off()
null device
1
>