DataInputStream dis = new DataInputStream(zf.getInputStream(new ZipEntry(fileName)));
double asseg[][];
double entropy[];
double error;
ClusterInfoFuzzy infoCluster[];
FuzzyKMean fkm = new FuzzyKMean(numCluster + 1, varSelLst);
//init result vector
curInfo = new ClusteringInfosFuzzy[numCluster];
entropy = new double[numCluster];
//System.out.println("Loading Fuzzy kMeans Results "+fileName);
for (i = 0; i < numCluster; i++) {
curNumCluster = dis.readInt();
entropy[i] = dis.readDouble();
error = dis.readDouble();
infoCluster = new ClusterInfoFuzzy[curNumCluster];
if (error != -1) {
for (k = 0; k < curNumCluster; k++) {
infoCluster[k] = new ClusterInfoFuzzy(numvars);
infoCluster[k].numOss = dis.readInt();
for (j = 0; j < numvars; j++) {
infoCluster[k].percVar[j] = dis.readDouble();
infoCluster[k].statClust[j].iNotZr = dis.readInt();
infoCluster[k].statClust[j].dMedia = dis.readDouble();
infoCluster[k].statClust[j].dStdEr = dis.readDouble();
infoCluster[k].statClust[j].dStdDv = dis.readDouble();
infoCluster[k].statClust[j].dVarnz = dis.readDouble();
infoCluster[k].statClust[j].dKurto = dis.readDouble();
infoCluster[k].statClust[j].dSkewn = dis.readDouble();
infoCluster[k].statClust[j].dRange = dis.readDouble();
infoCluster[k].statClust[j].dMaxOs = dis.readDouble();
infoCluster[k].statClust[j].dMinOs = dis.readDouble();
}
}
}
int nel;
asseg = new double[curNumCluster][numoss];
for (k = 0; k < curNumCluster; k++) {
//nel=dis.readInt();
for (j = 0; j < numoss; j++) {
asseg[k][j] = dis.readDouble();
}
}
fkm.setAssign(i, asseg);
curInfo[i] = (ClusteringInfosFuzzy) fkm.getClusteringInfos(i);
curInfo[i].infoCluster = infoCluster;
curInfo[i].setError(m, error);
}
fkm.setEntropy(entropy);
return fkm;
}