1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
| // Création de la matrice
SetLength(Matrix, MaxCol, MaxRow);
SetLength(Clusters, FMaxCluster);
SetLength(BestPartition, MaxRow);
SetLength(Xij, MaxRow, MaxCol);
SetLength(Xi_, MaxRow);
SetLength(X_j, MaxCol);
SetLength(Cj, MaxCol);
SetLength(Mi, MaxRow);
SetLength(T, MaxRow, MaxCol);
SetLength(Tj, MaxCol);
SetLength(Mg, FMaxCluster);
==> LE OOM apparaît ici !
SetLength(Wij, MaxRow, MaxCol);
==>
SetLength(Bki, FMaxCluster, MaxCol);
SetLength(BestCTRki, FMaxCluster, MaxCol);
SetLength(BestGki, FMaxCluster, MaxCol);
SetLength(BestWk, FMaxCluster);
SetLength(BestBk, FMaxCluster);
X__ := 0;
FBestR := 0;
try
for j:=0 to MaxRow-1 do
begin
// Indique le nombre de notices communes
for i:=0 to MaxCol-1 do
Matrix[i, j] := FField.Datas[i].Records.IntersectObject(FRecords[j]);
end;
(* Calcul de Xi_ *)
(* Xi. = p = nb de variables *)
(* Calcul de X_j *)
(*' X.j = nj = effectif ayant la modalité j *)
(* '= X.. = n p *)
For j:=0 to MaxRow-1 do
For i:=0 to MaxCol-1 do
IF Matrix[i, j]>0 then
begin
Xi_[j] := Xi_[j] + 1;
X_j[i] := X_j[i] + 1;
Inc(X__);
End;
(* Tableau après Transformation *)
For j:=0 to MaxRow-1 do
For i:=0 to MaxCol-1 do
begin
try
Xij[j, i] := (Matrix[i, j]/Xi_[j])/Sqrt(X_j[i]/X__);
except
Xij[j, i] := 0;
end;
Matrix[i, j] := Xij[j, i];
end;
.....
..... |
Partager