do.optimRadviz {Radviz} | R Documentation |
Optimize the Dimensional Anchors Position for Radviz projection using a Genetic Algorithm
Description
Allows to compute the best arrangement of Dimensional Anchors so that visualization efficiency is maximized.
Usage
do.optimRadviz(
springs,
similarity,
iter = 100,
n = 1000,
top = round(n * 0.1),
lambda = 0.01,
nlast = 5,
optim = "in.da"
)
do.optim(
springs,
similarity,
iter = 100,
n = 1000,
top = round(n * 0.1),
lambda = 0.01,
nlast = 5,
optim = "in.da"
)
Arguments
springs |
A matrix of 2D dimensional anchor coordinates, as returned by make.S |
similarity |
A similarity matrix measuring the correlation between Dimensional Anchors |
iter |
The maximum number of iterations (defaults to 100) |
n |
The number of permutations of Dimensional Anchors to be created at each generation |
top |
The number of permutations to keep to create the next generation |
lambda |
The threshold for the optimization process |
nlast |
The number of generations to wait before lambda is applied |
optim |
The optimization function (in or rv) |
Details
The first generation is a random sampling of all Dimensional Anchors. For every generation afterwards, only the best solutions (as specified by top) are kept; the solutions are normalized around the unit circle (ie c(1,2,3,4) is equivalent to c(4,1,2,3) for Radviz projection) before the next generation is created. The next generation consists of
all unique best solutions from the previous generation (after circular normalization)
a permutation of all previous solutions.
Briefly, for every Dimensional Anchor position the previous generation is sampled
to give a mixture of identical and slightly shifted (mutated) solutions.
The algorithm will stop when the maximum number of iterations (as defined by iter
)
is reached, or when a number of generations (defined by nlast
) as not improved over
the best solution by more than a given threshold (specified by lambda
).
Value
a list containing 3 sets of values:
-
perfs
the list of the best performances by generation -
best
the best performing arrangement by generation -
last
the top performing arrangements of the last generation
do.optim
do.optim
is being deprecated, please use do.optimRadviz
.
Author(s)
Yann Abraham
Examples
data(iris)
das <- c('Sepal.Length','Sepal.Width','Petal.Length','Petal.Width')
S <- make.S(das)
rv <- do.radviz(iris,S)
plot(rv,anchors.only=FALSE)
sim.mat <- cosine(iris[,das])
in.da(S,sim.mat) # the starting value
new <- do.optimRadviz(S,sim.mat,iter=10,n=100)
new.S <- make.S(get.optim(new))
new.rv <- do.radviz(iris,new.S)
plot(new.rv,anchors.only=FALSE)