stepArchetypesRawData: Archetype algorithm to raw data

View source: R/stepArchetypesRawData.R

stepArchetypesRawDataR Documentation

Archetype algorithm to raw data

Description

This is a slight modification of the original stepArchetypes function of the archetypes R package to apply the archetype algorithm to raw data. The stepArchetypes function standardizes the data by default and this option is not always desired.

Usage

stepArchetypesRawData(data,numArch,numRep=3,verbose=TRUE)

Arguments

data

Data to obtain archetypes.

numArch

Number of archetypes to compute, from 1 to numArch.

numRep

For each numArch, run archetypes numRep times.

verbose

If TRUE, the progress during execution is shown.

Value

A list with numArch elements. Each element is a list of class attribute stepArchetypes with numRep elements.

Author(s)

Guillermo Vinue based on the the original stepArchetypes function of archetypes.

References

Eugster, M. J., and Leisch, F., (2009). From Spider-Man to Hero - Archetypal Analysis in R, Journal of Statistical Software 30, 1–23, doi: 10.18637/jss.v030.i08.

Vinue, G., Epifanio, I., and Alemany, S., (2015). Archetypoids: a new approach to define representative archetypal data, Computational Statistics and Data Analysis 87, 102–115.

See Also

stepArchetypes

Examples

#COCKPIT DESIGN PROBLEM:
#As a toy example, only the first 25 individuals are used.
USAFSurvey_First25 <- USAFSurvey[1:25, ]
#Variable selection:
variabl_sel <- c(48, 40, 39, 33, 34, 36)
#Changing to inches: 
USAFSurvey_First25_inch <- USAFSurvey_First25[,variabl_sel] / (10 * 2.54)

#Data preprocessing:
USAFSurvey_preproc <- preprocessing(USAFSurvey_First25_inch, TRUE, 0.95, TRUE)

#For reproducing results, seed for randomness:
#suppressWarnings(RNGversion("3.5.0"))
#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 ; numRep <- 2
lass <- stepArchetypesRawData(data = USAFSurvey_preproc$data, numArch = 1:numArch,
                              numRep = numRep, verbose = FALSE) 
#To understand the warning messages, see the vignette of the
#archetypes package.                                

Anthropometry documentation built on March 7, 2023, 6:58 p.m.