[S] is 'mclust' non-deterministic???

Lutz Prechelt (prechelt@ira.uka.de)
Mon, 02 Mar 1998 15:46:03 +0100


I am applying mclust in a rather trivial way: I have only
scalar data and need only two clusters.

I am using the following function on a vector v:

my.mclust <- function(v, meth) {
v <- sort(v);
mcl <- mclust(cbind(v), method=meth);
cla <- mclass(mcl, 2)$classification;
cla
}

To my considerable surprise, the results vary from call to call:

> sort(d2)
[1] 0 0 0 0 3 3 4 4 4 4 7 7 9 20 30 40 50 60 70
[20] 80 98 100
> my.mclust(d2, "sum")
[1] 1 1 1 1 1 1 1 1 1 1 1 1 1 14 14 14 14 14 14 14 14 14
> my.mclust(d2, "sum")
[1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 19 19 19 19
> my.mclust(d2, "sum")
[1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 18 18 18 18 18
> my.mclust(d2, "sum")
[1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 19 19 19 19
> my.mclust(d2, "sum")
[1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 17 17 17 17 17 17
> my.mclust(d2, "sum")
[1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 18 18 18 18 18
> my.mclust(d2, "sum")
[1] 1 1 1 1 1 1 1 1 1 1 1 1 1 14 14 14 14 14 14 14 14 14

Similar variation also happens if I use meth="S".
There is no variation for meth="spher", meth="S*, or
meth="unconstrained".

I thought mclust always ought to be a deterministic procedure?
Is that assumption incorrect?
Or is there something wrong with my program? Or with S-Plus?
Any help is appreciated.

Lutz

Lutz Prechelt http://wwwipd.ira.uka.de/~prechelt/ | Whenever you
Institut f. Programmstrukturen und Datenorganisation | complicate things,
Universitaet Karlsruhe; D-76128 Karlsruhe; Germany | they get
(Phone: +49/721/608-4068, FAX: +49/721/608-7343) | less simple.
>>> Ever had negative research results? http://wwwipd.ira.uka.de/fnr <<<

-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news