Title: | Archetypal Analysis |
---|---|
Description: | The main function archetypes implements a framework for archetypal analysis supporting arbitrary problem solving mechanisms for the different conceptual parts of the algorithm. |
Authors: | Manuel J. A. Eugster [aut, cre], Friedrich Leisch [aut], Sohan Seth [ctb] |
Maintainer: | Manuel J. A. Eugster <[email protected]> |
License: | GPL (>= 2) |
Version: | 2.2-0.1 |
Built: | 2024-11-20 06:54:06 UTC |
Source: | CRAN |
An extraction on a stepArchetypes
object returns
again a stepArchetypes
object.
## S3 method for class 'stepArchetypes' x[i]
## S3 method for class 'stepArchetypes' x[i]
x |
A |
i |
The indizes to extract. |
A stepArchetypes
object containing only the parts
defined in i
.
Perform archetypal analysis on a data matrix.
archetypes(data, k, weights = NULL, maxIterations = 100, minImprovement = sqrt(.Machine$double.eps), maxKappa = 1000, verbose = FALSE, saveHistory = TRUE, family = archetypesFamily("original"), ...)
archetypes(data, k, weights = NULL, maxIterations = 100, minImprovement = sqrt(.Machine$double.eps), maxKappa = 1000, verbose = FALSE, saveHistory = TRUE, family = archetypesFamily("original"), ...)
data |
A numeric |
k |
The number of archetypes. |
weights |
Data weights matrix or vector (used as elements of the diagonal weights matrix). |
maxIterations |
The maximum number of iterations. |
minImprovement |
The minimal value of improvement between two iterations. |
maxKappa |
The limit of kappa to report an ill-ness warning. |
verbose |
Print some details during execution. |
saveHistory |
Save each execution step in an environment for further analyses. |
family |
Blocks defining the underlying problem
solving mechanisms; see |
... |
Additional arguments for family blocks. |
An object of class archetypes
, see
as.archetypes
.
Cutler and Breiman. Archetypal Analysis. Technometrics, 36(4), 1994. 338-348.
Other archetypes: archetypesFamily
;
as.archetypes
;
robustArchetypes
;
weightedArchetypes
data(toy) a <- archetypes(toy, 3)
data(toy) a <- archetypes(toy, 3)
This function returns a problem solving block for each of the different conceptual parts of the algorithm.
archetypesFamily(which = c("original", "weighted", "robust"), ...)
archetypesFamily(which = c("original", "weighted", "robust"), ...)
which |
The kind of archetypes family. |
... |
Exchange predefined family blocks with self-defined functions. |
A list containing a function for each of the different parts.
Other archetypes: archetypes
;
as.archetypes
;
robustArchetypes
;
weightedArchetypes
Two-dimensional projection of the observations based on the alpha coefficients into a space spanned by the (projected) archetypes.
archmap(object, projection = simplex_projection, projection_args = list(), rotate = 0, cex = 1.5, col = 1, pch = 1, xlab = "", ylab = "", axes = FALSE, asp = TRUE, ...)
archmap(object, projection = simplex_projection, projection_args = list(), rotate = 0, cex = 1.5, col = 1, pch = 1, xlab = "", ylab = "", axes = FALSE, asp = TRUE, ...)
object |
An |
projection |
Projection function; see
|
projection_args |
Arguments passed to the projection
function; see |
rotate |
Rotation angle to rotate the projection |
cex |
Character expansion of archetypes |
col |
Color of observations |
pch |
Point character of observations |
xlab |
A label for the x-axis |
ylab |
A label for the y-axis |
axes |
Logical value to draw axes or not |
asp |
The y/x aspect ratio |
... |
Arguments passed to the underlying plot function |
Invisible matrix with the projected archetypes
Other archmap: archmap_projections
,
atypes_projection
,
simplex_projection
,
tspsimplex_projection
## Not run: data("skel", package = "archetypes") skel2 <- subset(skel, select = -Gender) set.seed(1981) a <- archetypes(skel2, k = 5) ## Simplex projection: archmap(a, col = skel$Gender) ## Simplex projection with archetypes arranged according to their ## distances: archmap(a, col = skel$Gender, projection = tspsimplex_projection) archmap(a, col = skel$Gender, projection = tspsimplex_projection, projection_args = list(equidist = TRUE)) ## MDS projection: archmap(a, col = skel$Gender, projection = atypes_projection) ## End(Not run)
## Not run: data("skel", package = "archetypes") skel2 <- subset(skel, select = -Gender) set.seed(1981) a <- archetypes(skel2, k = 5) ## Simplex projection: archmap(a, col = skel$Gender) ## Simplex projection with archetypes arranged according to their ## distances: archmap(a, col = skel$Gender, projection = tspsimplex_projection) archmap(a, col = skel$Gender, projection = tspsimplex_projection, projection_args = list(equidist = TRUE)) ## MDS projection: archmap(a, col = skel$Gender, projection = atypes_projection) ## End(Not run)
Archetypes object constructor
as.archetypes(object, k, alphas, rss, iters = NULL, call = NULL, history = NULL, kappas = NULL, betas = NULL, zas = NULL, family = NULL, familyArgs = NULL, residuals = NULL, weights = NULL, reweights = NULL, scaling = NULL)
as.archetypes(object, k, alphas, rss, iters = NULL, call = NULL, history = NULL, kappas = NULL, betas = NULL, zas = NULL, family = NULL, familyArgs = NULL, residuals = NULL, weights = NULL, reweights = NULL, scaling = NULL)
object |
The archetypes; a |
k |
The number of archetypes; |
alphas |
The coefficients; a |
rss |
The residual sum of squares; see
|
iters |
The number of iterations to the convergence. |
call |
The call of the |
history |
If |
kappas |
The kappas for each system of linear equations. |
betas |
The data coefficients; a |
zas |
The temporary archetypes. |
family |
The archetypes family. |
familyArgs |
Additional arguments for family blocks. |
residuals |
The residuals. |
weights |
The data weights. |
reweights |
The data reweights. |
scaling |
The scaling parameters of the data. |
A list with an element for each parameter and class
attribute archetypes
.
Other archetypes: archetypesFamily
;
archetypes
; robustArchetypes
;
weightedArchetypes
Barplot of archetypes.
## S3 method for class 'archetypes' barplot(height, data, which = c("below", "beside"), which.beside = c("atypes", "variables"), which.below = c("compressed", "default"), percentiles = FALSE, below.compressed.height = 0.1, below.compressed.srt = 0, col.atypes = NULL, ...)
## S3 method for class 'archetypes' barplot(height, data, which = c("below", "beside"), which.beside = c("atypes", "variables"), which.below = c("compressed", "default"), percentiles = FALSE, below.compressed.height = 0.1, below.compressed.srt = 0, col.atypes = NULL, ...)
height |
An |
data |
The original data matrix. |
which |
|
which.beside |
Barplot according to |
which.below |
|
percentiles |
Show real values or percentile profiles. |
below.compressed.height |
Height of additional tail subplot. |
below.compressed.srt |
Rotations of the x-labels. |
col.atypes |
Color of archetypes; only used in
|
... |
Passed to the underlying |
Undefined.
Return best model
## S3 method for class 'stepArchetypes' bestModel(object, ...) ## S3 method for class 'repArchetypes' bestModel(object, ...)
## S3 method for class 'stepArchetypes' bestModel(object, ...) ## S3 method for class 'repArchetypes' bestModel(object, ...)
object |
An |
... |
Ignored |
Body girth measurements and skeletal diameter measurements, as well as age, weight, height and gender, are given for 507 physically active individuals - 247 men and 260 women.
body
body
A data.frame containing 507 observations of 25 variables.
Heinz, Peterson, Johnson and Kerk. "Exploring relationships in body dimensions". Journal of Statistics Education, 11(2). http://www.amstat.org/publications/jse/v11n2/datasets.heinz.html
skel
Return coefficients
## S3 method for class 'archetypes' coef(object, type = c("alphas", "betas"), ...)
## S3 method for class 'archetypes' coef(object, type = c("alphas", "betas"), ...)
object |
An |
type |
Return alpha or beta coefficients. |
... |
Ignored. |
Coefficient matrix.
Returns the approximated data.
## S3 method for class 'archetypes' fitted(object, ...)
## S3 method for class 'archetypes' fitted(object, ...)
object |
An |
... |
Ignored. |
Matrix with approximated data.
Return kappa
## S3 method for class 'archetypes' kappa(z, ...)
## S3 method for class 'archetypes' kappa(z, ...)
z |
An |
... |
Ignored. |
A vector of kappas.
Add lines to an existing parallel coordinates plot.
## S3 method for class 'pcplot' lines(x, data, col = 1, lty = 1, ...)
## S3 method for class 'pcplot' lines(x, data, col = 1, lty = 1, ...)
x |
A matrix or data frame containing the additional data. |
data |
The data of the existing parallel coordinates plot. |
col |
Line colors. |
lty |
Line types. |
... |
Passed to underlying
|
Undefined.
Archetypes movies.
Shows the intermediate steps of the algorithm;
Archetypes parallel coordinates plot movie.
movieplot(zs, data, show = c("atypes", "adata", "rwdata"), ssleep = 0, bsleep = 0, postfn = function(iter) { }, rwdata.col1 = gray(0.7), rwdata.col2 = 2, ...) movieplot2(zs, data, show = "atypes", ssleep = 0, bsleep = 0, zas.col = 2, zas.pch = 13, old.col = rgb(1, 0.5, 0.5), ...) moviepcplot(zs, data, show = c("atypes", "adata"), ssleep = 0, bsleep = 0, ...)
movieplot(zs, data, show = c("atypes", "adata", "rwdata"), ssleep = 0, bsleep = 0, postfn = function(iter) { }, rwdata.col1 = gray(0.7), rwdata.col2 = 2, ...) movieplot2(zs, data, show = "atypes", ssleep = 0, bsleep = 0, zas.col = 2, zas.pch = 13, old.col = rgb(1, 0.5, 0.5), ...) moviepcplot(zs, data, show = c("atypes", "adata"), ssleep = 0, bsleep = 0, ...)
zs |
An |
data |
The data matrix. |
show |
Show archetypes or approximated data. |
ssleep |
Seconds to sleep before start. |
bsleep |
Seconds to sleep between each plot. |
postfn |
Post plot function; is called in each iteration after the plot call. |
rwdata.col1 |
If |
rwdata.col2 |
If |
... |
Passed to underlying plot functions. |
zas.col |
Color of the intermediate archetypes. |
zas.pch |
Type of the intermediate archetypes points. |
old.col |
Color of the archetypes on step further. |
Undefined.
Undefined.
Undefined.
Return number of archetypes
## S3 method for class 'archetypes' nparameters(object, ...) ## S3 method for class 'stepArchetypes' nparameters(object, ...) ## S3 method for class 'repArchetypes' nparameters(object, ...)
## S3 method for class 'archetypes' nparameters(object, ...) ## S3 method for class 'stepArchetypes' nparameters(object, ...) ## S3 method for class 'repArchetypes' nparameters(object, ...)
object |
An |
... |
Ignored. |
Number of archetypes.
Panorma plot for archetypes.
## S3 method for class 'archetypes' panorama(object, data, distfn = distEuclidean, xlab = "Index", ylab = "Distance", order = TRUE, col = 1, pch = 1, cex = 1, atypes.col = (seq(length = nparameters(object)) + 1), atypes.pch = rep(19, nparameters(object)), atypes.cex = rep(1, nparameters(object)), ylim = NULL, ...)
## S3 method for class 'archetypes' panorama(object, data, distfn = distEuclidean, xlab = "Index", ylab = "Distance", order = TRUE, col = 1, pch = 1, cex = 1, atypes.col = (seq(length = nparameters(object)) + 1), atypes.pch = rep(19, nparameters(object)), atypes.cex = rep(1, nparameters(object)), ylim = NULL, ...)
object |
An |
data |
A matrix or data frame. |
distfn |
Distance function. |
xlab |
Label of xaxis. |
ylab |
Label of yaxis. |
order |
Order the distances. |
col |
Color of distances. |
pch |
Plot character of distances. |
cex |
magnification of the distances. |
atypes.col |
Color of archetype distances. |
atypes.pch |
Plot character of archetype distances. |
atypes.cex |
Magnification of the archetype distances. |
ylim |
The y limits of the plot. |
... |
Passed to the underlying |
## Not run: data(toy) a <- archetypes(toy, 3) panorama(a, toy) ## See demo(robust-ozone). ## End(Not run)
## Not run: data(toy) a <- archetypes(toy, 3) panorama(a, toy) ## See demo(robust-ozone). ## End(Not run)
Return fitted archetypes
## S4 method for signature 'archetypes' parameters(object, ...) ## S4 method for signature 'stepArchetypes' parameters(object, ...) ## S4 method for signature 'repArchetypes' parameters(object, ...)
## S4 method for signature 'archetypes' parameters(object, ...) ## S4 method for signature 'stepArchetypes' parameters(object, ...) ## S4 method for signature 'repArchetypes' parameters(object, ...)
object |
An |
... |
Ignored. |
Matrix with archetypes.
Parallel coordinates of data and archetypes.
## S3 method for class 'archetypes' pcplot(x, data, data.col = gray(0.7), data.lwd = 1, atypes.col = 2, atypes.lwd = 2, atypes.lty = 1, chull = NULL, chull.col = 1, chull.lwd = 2, chull.lty = 1, ...)
## S3 method for class 'archetypes' pcplot(x, data, data.col = gray(0.7), data.lwd = 1, atypes.col = 2, atypes.lwd = 2, atypes.lty = 1, chull = NULL, chull.col = 1, chull.lwd = 2, chull.lty = 1, ...)
x |
An |
data |
A matrix or data frame. |
data.col |
Color of data lines. |
data.lwd |
Width of data lines. |
atypes.col |
Color of archetypes lines. |
atypes.lwd |
Width of archetypes lines. |
atypes.lty |
Type of archetypes lines. |
chull |
An integer vector giving the indices of the
points from |
chull.col |
Color of convex hull lines. |
chull.lwd |
Width of convex hull lines. |
chull.lty |
Type of convex hull lines. |
... |
Passed to |
Undefined.
Code copied from function parcoord
of
package MASS
to simply play arround with the
visualization of archetypes. At a later date, when it is
clear which visualisation is the best, the functionality is
probabibly merged with the original function or it is
possible with parallel coordinate plots which are available
et all.
## Default S3 method: pcplot(x, col = gray(0.7), lty = 1, var.label = TRUE, rx = NULL, ...)
## Default S3 method: pcplot(x, col = gray(0.7), lty = 1, var.label = TRUE, rx = NULL, ...)
x |
A |
col |
Line color. |
lty |
Line type. |
var.label |
Axes labels. |
rx |
A |
... |
Passed to the underlying
|
Undefined.
This method produces predicted alpha coefficients for new data.
## S3 method for class 'archetypes' predict(object, newdata, ...)
## S3 method for class 'archetypes' predict(object, newdata, ...)
object |
An |
newdata |
A data frame with data for which to predict the alpha coefficients. |
... |
Ignored. |
The predict alpha coefficients.
Return residuals
## S3 method for class 'archetypes' residuals(object, ...)
## S3 method for class 'archetypes' residuals(object, ...)
object |
An |
... |
Ignored. |
Matrix with residuals.
Robust archetypes
robustArchetypes(data, k, familyBlocks = list(), ...)
robustArchetypes(data, k, familyBlocks = list(), ...)
familyBlocks |
Exchange predefined family blocks;
see |
data |
A numeric |
k |
The number of archetypes. |
... |
Additional arguments for family blocks. |
An object of class robustArchetypes
and
as.archetypes
.
Other archetypes: archetypesFamily
;
archetypes
; as.archetypes
;
weightedArchetypes
Generics defined by the archetypes package.
Return number of parameters
Return best model
Panorama
Parallel coordinates plot
rss(object, ...) nparameters(object, ...) bestModel(object, ...) panorama(object, ...) pcplot(x, ...)
rss(object, ...) nparameters(object, ...) bestModel(object, ...) panorama(object, ...) pcplot(x, ...)
object |
An object |
... |
Futher arguments |
x |
An object. |
Return residual sum of squares
## S3 method for class 'archetypes' rss(object, type = c("scaled", "single", "global"), ...) ## S3 method for class 'stepArchetypes' rss(object, ...) ## S3 method for class 'repArchetypes' rss(object, ...)
## S3 method for class 'archetypes' rss(object, type = c("scaled", "single", "global"), ...) ## S3 method for class 'stepArchetypes' rss(object, ...) ## S3 method for class 'repArchetypes' rss(object, ...)
object |
An |
type |
Return scaled, single or global RSS. |
... |
Ignored. |
Residual sum of squares.
Screeplot draws the residual sum of square curve based on the best model of each step.
## S3 method for class 'stepArchetypes' screeplot(x, type = c("lines", "barplot"), ...)
## S3 method for class 'stepArchetypes' screeplot(x, type = c("lines", "barplot"), ...)
x |
A |
type |
Draw lines or a barplot. |
... |
Passed to underlying plot functions. |
Undefined.
Archetypal map projections
simplex_projection(x, r = 10) tspsimplex_projection(x, r = 10, equidist = FALSE, ...) atypes_projection(x)
simplex_projection(x, r = 10) tspsimplex_projection(x, r = 10, equidist = FALSE, ...) atypes_projection(x)
x |
Archetypes matrix |
r |
Radius of the simplex projection |
equidist |
Arrange archetypes equidistantly or in relation to their distance |
... |
Parameters for the
|
Matrix with the projected archetypes
Other archmap: archmap
The stochastic nature of the alpha coefficients implies that they exist on a standard (K-1)-simplex with the K archetypes Z as the corners, and the coefficients as the coordinate with respect to these corners. A standard simplex can be projected to two dimensions via a skew orthogonal projection, where all the vertices of the simplex are shown on a circle connected by edges. The individual alpha coefficients can be then projected into this circle.
simplexplot(object, radius = 10, order = NULL, labels_cex = 1, labels = NULL, show_labels = TRUE, points_col = "#00000044", points_pch = 19, points_cex = 1, projection = simplex_projection, show_points = TRUE, show_circle = TRUE, circle_col = "lightgray", show_edges = TRUE, edges_col = "lightgray", show_direction = FALSE, direction_length = 1, directions_col = points_col, ...)
simplexplot(object, radius = 10, order = NULL, labels_cex = 1, labels = NULL, show_labels = TRUE, points_col = "#00000044", points_pch = 19, points_cex = 1, projection = simplex_projection, show_points = TRUE, show_circle = TRUE, circle_col = "lightgray", show_edges = TRUE, edges_col = "lightgray", show_direction = FALSE, direction_length = 1, directions_col = points_col, ...)
object |
An |
radius |
Radius of the projection |
order |
Order of the archetypes |
labels_cex |
Label expansion |
labels |
Labels |
show_labels |
Show labels |
points_col |
Color of the points |
points_pch |
Plot character of the points |
points_cex |
Character expansion of the points |
projection |
Projection function; see
|
show_points |
Show the points |
show_circle |
Show the circle |
circle_col |
Color of the circle |
show_edges |
Show the edges |
edges_col |
Color of the edges |
direction_length |
Expansion of the direction pointers |
directions_col |
Color of the direction pointers |
show_direction |
Show direction pointers |
... |
Additional arguments; currently ignored |
Invisible list of all computed components needed for the simplex visualization.
See Section 6 in "Probabilistic Archetypal Analysis" by Seth and Eugster (2014), http://arxiv.org/abs/1312.7604.
### This example reproduces parts of the Figure 7 shown in ### "Probabilistic Archetypal Analysis" by Seth and Eugster (2014) data("toy", package = "archetypes") suppressWarnings(RNGversion("3.5.0")) set.seed(1234); a3 <- archetypes(toy, k = 3) set.seed(1237); a4 <- archetypes(toy, k = 4) set.seed(1238); a5 <- archetypes(toy, k = 5) simplexplot(a3) simplexplot(a3, show_direction = TRUE, show_points = FALSE) simplexplot(a4, projection = tspsimplex_projection) simplexplot(a5, show_direction = TRUE, show_points = FALSE, direction_length = 2, directions_col = "black")
### This example reproduces parts of the Figure 7 shown in ### "Probabilistic Archetypal Analysis" by Seth and Eugster (2014) data("toy", package = "archetypes") suppressWarnings(RNGversion("3.5.0")) set.seed(1234); a3 <- archetypes(toy, k = 3) set.seed(1237); a4 <- archetypes(toy, k = 4) set.seed(1238); a5 <- archetypes(toy, k = 5) simplexplot(a3) simplexplot(a3, show_direction = TRUE, show_points = FALSE) simplexplot(a4, projection = tspsimplex_projection) simplexplot(a5, show_direction = TRUE, show_points = FALSE, direction_length = 2, directions_col = "black")
Skeletal diameter measurements, as well as height and gender, are given for 507 physically active individuals - 247 men and 260 women.
This is a subset of the body
data set.
skel
skel
A data.frame containing 507 observations of 11 variables.
Heinz, Peterson, Johnson and Kerk. "Exploring relationships in body dimensions". Journal of Statistics Education, 11(2). http://www.amstat.org/publications/jse/v11n2/datasets.heinz.html
body
Displays a schematic representation of skeleton data as
available in dataset skel
.
Displays a generic skeleton with annotations explaining the
measurements available in data set skel
.
skeletonplot(x, skel.width = 100, skel.height = 200, ylab = "Height (cm)", base.radius = 2, xlab = "", xlim = (nrow(x) * c(0, skel.width)), ylim = c(0, skel.height), col = NULL, mtext = TRUE, skel.lwd = 1, ...) jd()
skeletonplot(x, skel.width = 100, skel.height = 200, ylab = "Height (cm)", base.radius = 2, xlab = "", xlim = (nrow(x) * c(0, skel.width)), ylim = c(0, skel.height), col = NULL, mtext = TRUE, skel.lwd = 1, ...) jd()
x |
Matrix or data.frame of skeleton data. |
skel.width |
Reference width for instance calculation. |
skel.height |
Reference height for instance calculation. |
base.radius |
Base radius for points. |
xlab |
The x label of the plot. |
ylab |
The y label of the plot. |
xlim |
Numeric of length 2 giving the x limits for the plot. |
ylim |
Numeric of length 2 giving the y limits for the plot. |
col |
Color of the different parts of the skeleton. |
mtext |
Label archetypes. |
skel.lwd |
Line width of skeleton. |
... |
Passed to underlying canvas plot function. |
List of skeleton instances.
Generic skeleton instance.
Run archetypes algorithm repeatedly
stepArchetypes(..., k, nrep = 3, method = archetypes, verbose = TRUE)
stepArchetypes(..., k, nrep = 3, method = archetypes, verbose = TRUE)
... |
Passed to the specific archetype function. |
k |
A vector of integers passed in turn to the k
argument of |
nrep |
For each value of |
method |
Archetypes function to use, typically
|
verbose |
Show progress during exection. |
A list with k
elements and class attribute
stepArchetypes
. Each element is a list of class
repArchetypes
with nrep
elements; only for
internal usage.
## Not run: data(skel) skel2 <- subset(skel, select=-Gender) as <- stepArchetypes(skel2, k=1:5, verbose=FALSE) ## Residual sum of squares curve: screeplot(as) ## Select three archetypes and from that the best ## recurrence: a3 <- bestModel(as[[3]]) ## End(Not run)
## Not run: data(skel) skel2 <- subset(skel, select=-Gender) as <- stepArchetypes(skel2, k=1:5, verbose=FALSE) ## Residual sum of squares curve: screeplot(as) ## Select three archetypes and from that the best ## recurrence: a3 <- bestModel(as[[3]]) ## End(Not run)
Summary method for stepArchetypes object
## S3 method for class 'stepArchetypes' summary(object, ...)
## S3 method for class 'stepArchetypes' summary(object, ...)
object |
A |
... |
Ignored. |
Undefined.
A simple artificial two-dimensional data set.
toy
toy
A data.frame containing 250 observations of 2 variables.
Weighted archetypes
weightedArchetypes(data, k, weights = NULL, familyBlocks = list(), ...)
weightedArchetypes(data, k, weights = NULL, familyBlocks = list(), ...)
weights |
Data weights matrix. |
familyBlocks |
Exchange predefined family blocks;
see |
data |
A numeric |
k |
The number of archetypes. |
... |
Additional arguments for family blocks. |
An object of class weightedArchetypes
and
as.archetypes
.
Other archetypes: archetypesFamily
;
archetypes
; as.archetypes
;
robustArchetypes
Return weights
## S3 method for class 'archetypes' weights(object, type = c("weights", "reweights"), ...)
## S3 method for class 'archetypes' weights(object, type = c("weights", "reweights"), ...)
object |
An |
type |
Return global weights (weighted archetypes) or weights calculated during the iterations (robust archetypes). |
... |
Ignored. |
Vector of weights.
Two-dimensional plot.
xyplot(x, ...)
xyplot(x, ...)
x |
An object. |
... |
Further arguments. |
Undefined.
Plot of two-dimensional data and archetypes.
## S3 method for class 'archetypes' xyplot(x, y, data.col = 1, data.pch = 19, data.bg = NULL, atypes.col = 2, atypes.pch = 19, ahull.show = TRUE, ahull.col = atypes.col, chull = NULL, chull.col = gray(0.7), chull.pch = 19, adata.show = FALSE, adata.col = 3, adata.pch = 13, link.col = data.col, link.lty = 1, ...)
## S3 method for class 'archetypes' xyplot(x, y, data.col = 1, data.pch = 19, data.bg = NULL, atypes.col = 2, atypes.pch = 19, ahull.show = TRUE, ahull.col = atypes.col, chull = NULL, chull.col = gray(0.7), chull.pch = 19, adata.show = FALSE, adata.col = 3, adata.pch = 13, link.col = data.col, link.lty = 1, ...)
x |
An |
y |
A matrix or data frame. |
data.col |
Color of data points. |
data.pch |
Type of data points. |
data.bg |
Background of data points. |
atypes.col |
Color of archetypes points. |
atypes.pch |
Type of archetypes points. |
ahull.show |
Show approximated convex hull. |
ahull.col |
Color of approximated convex hull line. |
chull |
An integer vector giving the indices of the
points from |
chull.col |
Color of convex hull points. |
chull.pch |
Type of convex hull points. |
adata.show |
Show approximated data with link to the original data. |
adata.col |
Color of approximated data points. |
adata.pch |
Type of approximated data points. |
link.col |
Color of link between approximated and original data points. |
link.lty |
Line type of link between approximated and original data points. |
... |
Passed to the underlying plot functions. |
Undefined.
The link between approximated and original data is based on an idea and Matlab source code of Bernard Pailthorpe.
Plot of two-dimensional data and robust archetypes.
## S3 method for class 'robustArchetypes' xyplot(x, y, ...)
## S3 method for class 'robustArchetypes' xyplot(x, y, ...)
x |
An |
y |
A matrix or data frame. |
... |
Arguments of
|
Plot of two-dimensional data and stepArchetypes.
## S3 method for class 'stepArchetypes' xyplot(x, y, data.col = gray(0.7), data.pch = 19, atypes.col = (seq_len(length(x) * length(x[[1]])) + 1), atypes.pch = 19, ahull.show = TRUE, ahull.col = atypes.col, ...)
## S3 method for class 'stepArchetypes' xyplot(x, y, data.col = gray(0.7), data.pch = 19, atypes.col = (seq_len(length(x) * length(x[[1]])) + 1), atypes.pch = 19, ahull.show = TRUE, ahull.col = atypes.col, ...)
x |
An |
y |
A matrix or data frame. |
data.col |
Color of data points. |
data.pch |
Type of data points. |
atypes.col |
Color of archetypes points. |
atypes.pch |
Type of archetypes points. |
ahull.show |
Show approximated convex hull. |
ahull.col |
Color of approximated convex hull line. |
... |
Passed to the underlying plot functions. |
Undefined.
Plot of two-dimensional data and weighted archetypes.
## S3 method for class 'weightedArchetypes' xyplot(x, y, data.col = 1, data.pch = 21, data.bg = gray, link.col = NULL, link.lty = NULL, weights.type = "weights", ...)
## S3 method for class 'weightedArchetypes' xyplot(x, y, data.col = 1, data.pch = 21, data.bg = gray, link.col = NULL, link.lty = NULL, weights.type = "weights", ...)
x |
An |
y |
A matrix or data frame. |
data.col |
Color of data points. |
data.pch |
Type of data points. |
data.bg |
Background of data points. |
link.col |
Color of link between approximated and original data points. |
link.lty |
Line type of link between approximated and original data points. |
weights.type |
Weights to display; see
|
... |
Arguments of |