@Override public double getInclusionProbability(Instance instance) { double probability = 0; for (CFCluster cf : mMicroClusters) { probability = cf.getInclusionProbability(instance); if (probability > 0d) return probability; } return probability; }
public NonConvexCluster(CFCluster cluster, List<CFCluster> microclusters) { super(cluster); // required mMicroClusters = new Vector<CFCluster>(); mMicroClusters.addAll(microclusters); // assuming we have a circular shaped cluster, compute it's center: only // for visualization for (CFCluster cf : microclusters) { if (!cf.equals(cluster)) this.add(cf); } }
@Override protected void getClusterSpecificInfo(ArrayList<String> infoTitle, ArrayList<String> infoValue) { super.getClusterSpecificInfo(infoTitle, infoValue); infoTitle.add("Deviation"); double[] variance = getVarianceVector(); double sumOfDeviation = 0.0; for (int i = 0; i < variance.length; i++) { double d = Math.sqrt(variance[i]); sumOfDeviation += d; } sumOfDeviation /= variance.length; infoValue.add(Double.toString(sumOfDeviation)); }