attimp: Compute and plot relevance of the attributes for selected...

Description Usage Arguments Value Note See Also Examples

View source: R/attimp.R

Description

This function computes and displays the revelance (importance) of each attribute to the clustering of a selected group of objects. The relevance values are displayed in order of descending value. Optionally, on the same plot, are displayed corresponding ordered importances of randomly selected groups of objects of the same size.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
attimp(
  X,
  group,
  range = 1:min(20, ncol(X)),
  times = 0,
  lX = if (class(X) == "data.frame") {     lX <- NULL } else {     lX <- 1 },
  donames = FALSE,
  fast = FALSE,
  trans = 1,
  maximp = 20,
  xmiss = NULL,
  horiz = FALSE,
  main = "Cluster",
  att.names = 1:ncol(X),
  ord.names = FALSE,
  names.size = 1,
  ylim = c(0, wtave[o[1]]),
  ntick = 20,
  rlines = TRUE,
  targ = NULL,
  lwd = 1,
  cache = FALSE
)

Arguments

X

data.frame or an input data matrix object of class matrix and mode numeric. Rows are objects and columns are attributes (variables).

group

vector of identities of objects in the group

range

range of ordered importance values plotted (all are computed)

times

number of randomly sampled groups for which ordered importances are also plotted

lX

either an integer or a vector of attribute flags with as much elements as columns in X (see the help file of cosa2). This argument is ignored if X is a data.frame
'

donames

TRUE / FALSE => do/don't show names of attributes on plot.

fast

TRUE / FALSE => do/don't use fast approximate calculation (less stable estimate). Should only be done with very large groups (when regular calculation takes way too long).

trans

power used to transform important scale.

maximp

maximum obtainable importance value

xmiss

missing value flag (see the help file of cosa2).

horiz

TRUE, FALSE => do/don't plot importances horizontally (ignored if time > 0).

main

plot title

att.names

vector of names for each attribute (ignored if donames = FALSE).

ord.names

a logical value that indicates whether the attributes labels should be ordered from high to low attribute importance (ignored if donames = FALSE).

names.size

expansion factor for names.

ylim

vertical range of plot.

ntick

number of tick marks on importance axis.

rlines

a logical value that indicates whether the replicate lines should show in the plot as well.

targ

target values for computing targeted dissimilarities. The targ[k] is the target value for X[,k]. The value is ignored if lX[k] = 0, 1, or 4.
If lX[k]=2 or 5, then targ[k] contains the single target value.
If lX[k]=3 or 6, then targ[k] contains one of the two target values.

Special values:

targ = "low"
targ = "high"
targ = "high/low"

lwd

line width (see par).

cache

a logical value indicating whether the data should show as a variable (object) in the output as well (NB. NOT IN USE YET).

Value

$imp

vector of all attribute importances ordered in descending value.

$att

vector of attribute identities in descending order of importance.

Note

the lX vector and/or the value of xmiss can be specified as attributes to the input data matrix before invoking attimp (see cosa2)

See Also

hclust, getclust, and attvalues.

Examples

1
2
3
4
# make sure X and group are defined... For that, see getclust.
# at <- attimp(X, group[[2]])
# at <- attimp(X, group[[1]], 1:100, trans = 0.5, att.names = names, horiz = TRUE, main= 'Group 1')
# at <- attimp(X, group[[3]], 1:ncol(X), 10, main =' Group 3')

mkampert/rCOSA documentation built on Dec. 23, 2019, 8:21 p.m.