Package jmt.engine.jwat.workloadAnalysis.clustering.fuzzyKMean

Examples of jmt.engine.jwat.workloadAnalysis.clustering.fuzzyKMean.ClusteringInfosFuzzy


    }
  }

  private void saveFuzzyData(ZipOutputStream zos, FuzzyKMean clustering) throws IOException {
    int i, j, k, s;
    ClusteringInfosFuzzy curInfo;
    ClusterInfoFuzzy curClustInfo[];
    double clustAssign[][];
    double entropy[];
    DataOutputStream dos = new DataOutputStream(zos);

    for (i = 0; i < clustering.getNumCluster(); i++) {
      curInfo = (ClusteringInfosFuzzy) clustering.getClusteringInfos(i);
      dos.writeInt(curInfo.getNumClusters());
      dos.writeDouble(clustering.getEntropy()[i]);
      dos.writeDouble(curInfo.getError());
      if (curInfo.getError() != -1) {
        curClustInfo = curInfo.infoCluster;
        //Write clusters infos
        for (j = 0; j < curInfo.getNumClusters(); j++) {
          dos.writeInt(curInfo.numElem[j]);
          for (k = 0; k < model.getMatrix().getNumVariables(); k++) {
            dos.writeDouble(curClustInfo[j].percVar[k]);
            dos.writeInt(curClustInfo[j].statClust[k].iNotZr);
            dos.writeDouble(curClustInfo[j].statClust[k].dMedia);
            dos.writeDouble(curClustInfo[j].statClust[k].dStdEr);
            dos.writeDouble(curClustInfo[j].statClust[k].dStdDv);
            dos.writeDouble(curClustInfo[j].statClust[k].dVarnz);
            dos.writeDouble(curClustInfo[j].statClust[k].dKurto);
            dos.writeDouble(curClustInfo[j].statClust[k].dSkewn);
            dos.writeDouble(curClustInfo[j].statClust[k].dRange);
            dos.writeDouble(curClustInfo[j].statClust[k].dMinOs);
            dos.writeDouble(curClustInfo[j].statClust[k].dMaxOs);
          }
        }
      }
      clustAssign = clustering.getAssignment(i);
      //Write clustering assignment
      for (k = 0; k < curInfo.getNumClusters(); k++) {
        //dos.writeInt(clustAssign[i].length);
        for (j = 0; j < clustAssign[k].length; j++) {
          dos.writeDouble(clustAssign[k][j]);
        }
      }
View Full Code Here


    }
    return new KMean(curInfo, varSelLst, asseg);
  }

  private FuzzyKMean loadFuzzyResult(int numCluster, int varSelLst[], String fileName, ZipFile zf) throws IOException {
    ClusteringInfosFuzzy curInfo[];
    int i, j, k;
    int curNumCluster;
    MatrixOsservazioni m = waSession.getDataModel().getMatrix();
    int numvars = m.getNumVariables();
    int numoss = m.getNumOfObs();
View Full Code Here

              if (changedType) {
                matrixPanel.removeAll();
              }
              switch (session.getListOfClustering().get(clusteringTable.getSelectedRow()).getClusteringType()) {
                case FUZZYK:
                  ClusteringInfosFuzzy infos = ((ClusteringInfosFuzzy) ((FuzzyKMean) session.getListOfClustering().get(
                      clusteringTable.getSelectedRow())).getClusteringInfos(clusterTable.getSelectedRow()));
                  if (infos.getError() == -1) {
                    infos.setError(model.getMatrix(), 0.1);
                  }
                  if (changedType) {
                    panelDispF = new DispersionFuzzyPanel(session, clusteringTable.getSelectedRow(), clusterTable
                        .getSelectedRow());
                    //matrix2 = new DispFuzzyMatrix(model,-1);
View Full Code Here

TOP

Related Classes of jmt.engine.jwat.workloadAnalysis.clustering.fuzzyKMean.ClusteringInfosFuzzy

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.