📄 clusteringinfoskmean.java
字号:
package jmt.engine.jwat.workloadAnalysis.clustering.kMean;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.Vector;
import jmt.engine.jwat.MatrixOsservazioni;
import jmt.engine.jwat.Observation;
import jmt.engine.jwat.workloadAnalysis.clustering.ClusteringInfos;
import jmt.engine.jwat.workloadAnalysis.clustering.kMean.KMeanClusteringEngine.TempClusterStatistics;
public class ClusteringInfosKMean implements ClusteringInfos{
public ClusterInfoKMean[] infoCluster;
private static final String SPACES5 = " ";
private static final String SPACES7 = " ";
private static final String SPACES16 = " ";
private NumberFormat Floatformatter = new DecimalFormat("###.##E0");
public int isGoodCluster; // -1 non presente; 0 non ottimo; 1 ottimo
public double omsr; // overall
public double ratio; // ratio
public int[] numElem; // numero di elementi di ogni singolo cluster
public double[] percent; // percentuale sul totale
public String centri; // contiene i centri dei cluster
public String log; // informazioni generali
private int numCluster;
public double passw;
public ClusteringInfosKMean(int numCluster,int nvars){
centri="";
log="";
ratio=-1;
isGoodCluster=0;
numElem=new int[numCluster+1];
infoCluster = new ClusterInfoKMean[numCluster+1];
for(int i = 0; i < numCluster+1;i++){
infoCluster[i] = new ClusterInfoKMean(nvars);
}
percent = new double[numCluster+1];
this.numCluster=numCluster;
}
public void Output(int[] varSel,TempClusterStatistics[][] sum,short[] clusAssign,MatrixOsservazioni m
,double oldPassw) //Deve valere assw precedentemente calcolato
{
passw = oldPassw;
String tempStr;
String crlf = "\n";
double ssb; // varianza fra le classi sulla variabile j
double ssw; // varianza interna sulla variabile j
double dfw = 0; // grado di libert
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -