Professional Documents
Culture Documents
Holect 18
Holect 18
Holect 18
as long as the ratio of the sample sizes stays a number. (bounded away from zero as they increase.)
Not the travelling salesman problem. Algorithms include Prim's, Kruskals', I have implemented the greedy
algorithm which is as follows: (it is a recursive algorithm) T0 is a point.
Suppose we have Ti , add an edge to it by nding the minimal edge between a point in the tree and a point
that is not, join these to make Ti+1 .
Algorithm:
$order:
[,1] [,2]
[1,] 4 7
[2,] 3 10
[3,] 5 6
[4,] 6 9
[5,] 7 8
[6,] 10 3
[7,] 1 1
[8,] 9 4
[9,] 8 5
[10,] 2 2
order: matrix, of size nrow(x) by 2, giving two types of ord-
ering: The first column presents the standard ordering
from one extreme of the minimal spanning tree to the oth-
er. This starts on one end of a diameter and numbers the
points in a certain order so that points close together in
Euclidean space tend to be close in the sequence. The
second column presents the radial ordering, based on dis-
tance from the center of the minimal spanning tree. These
can be used to detect clustering. See below for graph
theory definitions.
Two-sample test
TANINS
D28
> sum(vin[mst.wine,15]==vin[-78,15]) 15INDGEL16 52
47 42 22
5
randclass=function(S=1000,data=as.numeric(vin[-78,15]), 20 412139
3845
467624
193726 49
TEINTE
compar=as.numeric(vin[mst.wine,15])){ INDHCL 40
69
36 JAUNE
Comp.2
11
9101 18 48 51
same=rep(0,S) 25
7 75 43
0.0
78
0
63 77
n=length(compar) ANTCY 322 6659 65 68
3363 74
for (i in (1:S)) 4 5 8 3062 67 72
31
−0.1
same[i]=sum(as.numeric(data==compar[sample(n,n)])) DAFLAV 28 64 71
ROUGE 34 60
61 73
return(same)} 27 58 57 70
−5
55 35
−0.2
r1=randclass() 29
> max(r1) 56 53 54
[1] 39
−0.2 −0.1 0.0 0.1 0.2
> max(r2)
[1] 40 Comp.1
hist(r1,nclass=50)
Matlab MSTREE algorithm:
loadings = loadscrs(X,evects,npc,loadtype);
return;
e =
0.7607 0.7768 0.5830 0.6054 -0.1665 -0.1424 -0.1411 -0.1228 -0.0256 -0.0220
0.7226 0.7371 0.2036 0.2725 0.2543 0.3298 0.4791 0.5041 -0.0910 -0.0816
0.8491 0.8535 -0.1031 -0.0931 0.1059 0.1219 0.0170 0.0381 0.4659 0.4750
0.7972 0.8070 -0.3006 -0.2642 0.3932 0.4286 -0.3134 -0.2483 -0.1006 -0.0887
0.8038 0.8108 -0.4817 -0.4511 -0.3214 -0.2997 0.0377 0.0954 -0.0510 -0.0456