Package jmt.engine.jwat.workloadAnalysis.clustering.kMean

Examples of jmt.engine.jwat.workloadAnalysis.clustering.kMean.ClusteringInfosKMean


    root.appendChild(varEl);
  }

  private void saveKmeansData(ZipOutputStream zos, KMean clustering) throws IOException {
    int i, j, k;
    ClusteringInfosKMean curInfo;
    ClusterInfoKMean curClustInfo[];
    short clustAssign[][];
    DataOutputStream dos = new DataOutputStream(zos);
    clustAssign = clustering.getAsseg();
View Full Code Here


    }
    return varSelLst;
  }

  private KMean loadKmeanResult(int numCluster, int varSelLst[], String fileName, ZipFile zf) throws IOException {
    ClusteringInfosKMean curInfo[];
    int i, j, k;
    int curNumCluster;
    MatrixOsservazioni m = waSession.getDataModel().getMatrix();
    int numvars = m.getNumVariables();
    int numoss = m.getNumOfObs();
    DataInputStream dis = new DataInputStream(zf.getInputStream(new ZipEntry(fileName)));
    short asseg[][];

    //init result vector
    curInfo = new ClusteringInfosKMean[numCluster];
    asseg = new short[numCluster][numoss];

    //System.out.println("Loading kMeans Results "+fileName);
    for (i = 0; i < numCluster; i++) {
      curNumCluster = dis.readInt();
      curInfo[i] = new ClusteringInfosKMean(curNumCluster - 1, numvars);
      curInfo[i].omsr = dis.readDouble();
      curInfo[i].ratio = dis.readDouble();
      for (k = 0; k < curNumCluster; k++) {
        curInfo[i].infoCluster[k] = new ClusterInfoKMean(numvars);
        curInfo[i].infoCluster[k].numOss = dis.readInt();
View Full Code Here

TOP

Related Classes of jmt.engine.jwat.workloadAnalysis.clustering.kMean.ClusteringInfosKMean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.