Tabnine Logo
HDBSCANHierarchyExtraction$TempCluster
Code IndexAdd Tabnine to your IDE (free)

How to use
HDBSCANHierarchyExtraction$TempCluster
in
de.lmu.ifi.dbs.elki.algorithm.clustering.hierarchical.extraction

Best Java code snippets using de.lmu.ifi.dbs.elki.algorithm.clustering.hierarchical.extraction.HDBSCANHierarchyExtraction$TempCluster (Showing top 20 results out of 315)

origin: elki-project/elki

/**
 * Excess of mass measure.
 *
 * @return Excess of mass
 */
public double totalStability() {
 double stability = excessOfMass();
 double cstab = 0.;
 for(TempCluster child : children) {
  cstab += Math.abs(child.totalStability());
 }
 return stability > cstab ? stability : -cstab;
}
origin: de.lmu.ifi.dbs.elki/elki-clustering

/**
 * Cluster containing two existing clusters.
 *
 * @param dist Distance
 * @param a First cluster
 * @param b Second cluster
 */
public TempCluster(double dist, TempCluster a, TempCluster b) {
 this.dist = dist;
 this.children.add(a);
 this.children.add(b);
 this.childrenTotal = a.totalElements() + b.totalElements();
 this.aggregate = this.childrenTotal / dist;
}
origin: de.lmu.ifi.dbs.elki/elki

  if(cclus.isSpurious(minClSize)) {
   noise.addDBIDs(cclus.members);
  toplevel.add(new TempCluster(dist, clead));
if(!oSpurious && !cSpurious) {
 cclus = cclus != null ? cclus : new TempCluster(cdist, clead);
 oclus = oclus != null ? oclus : new TempCluster(odist, olead);
 nclus = new TempCluster(dist, oclus, cclus);
  nclus = oclus.grow(dist, cclus, clead);
  nclus = cclus.grow(dist, oclus, olead);
  nclus = oclus.grow(dist, cclus, clead).resetAggregate();
  nclus = cclus.grow(dist, oclus, olead).resetAggregate();
  nclus = new TempCluster(dist, clead, olead);
origin: elki-project/elki

  if(cclus.isSpurious(minClSize)) {
   noise.addDBIDs(cclus.members);
  toplevel.add(new TempCluster(dist, clead));
if(!oSpurious && !cSpurious) {
 cclus = cclus != null ? cclus : new TempCluster(cdist, clead);
 oclus = oclus != null ? oclus : new TempCluster(odist, olead);
 nclus = new TempCluster(dist, oclus, cclus);
  nclus = oclus.grow(dist, cclus, clead);
  nclus = cclus.grow(dist, oclus, olead);
  nclus = oclus.grow(dist, cclus, clead).resetAggregate();
  nclus = cclus.grow(dist, oclus, olead).resetAggregate();
  nclus = new TempCluster(dist, clead, olead);
origin: de.lmu.ifi.dbs.elki/elki-clustering

  if(cclus.isSpurious(minClSize)) {
   noise.addDBIDs(cclus.members);
  toplevel.add(new TempCluster(dist, clead));
if(!oSpurious && !cSpurious) {
 cclus = cclus != null ? cclus : new TempCluster(cdist, clead);
 oclus = oclus != null ? oclus : new TempCluster(odist, olead);
 nclus = new TempCluster(dist, oclus, cclus);
  nclus = oclus.grow(dist, cclus, clead);
  nclus = cclus.grow(dist, oclus, olead);
  nclus = oclus.grow(dist, cclus, clead).resetAggregate();
  nclus = cclus.grow(dist, oclus, olead).resetAggregate();
  nclus = new TempCluster(dist, clead, olead);
origin: de.lmu.ifi.dbs.elki/elki

 /**
  * Recursive flattening of clusters.
  *
  * @param clustering Output clustering
  * @param cur Current temporary cluster
  * @param clus Output cluster
  * @param flatten Flag to indicate everything below should be flattened.
  * @param hierarchical Hierarchical output
  */
 private void collectChildren(Clustering<DendrogramModel> clustering, TempCluster cur, Cluster<DendrogramModel> clus, boolean flatten, boolean hierarchical) {
  for(TempCluster child : cur.children) {
   if(flatten || child.totalStability() < 0) {
    members.addDBIDs(child.members);
    collectChildren(clustering, child, clus, flatten, hierarchical);
   }
   else {
    child.finalizeCluster(clustering, clus, true, hierarchical);
   }
  }
 }
}
origin: de.lmu.ifi.dbs.elki/elki-clustering

 /**
  * Recursive flattening of clusters.
  *
  * @param clustering Output clustering
  * @param cur Current temporary cluster
  * @param clus Output cluster
  * @param flatten Flag to indicate everything below should be flattened.
  */
 private void collectChildren(TempCluster temp, Clustering<DendrogramModel> clustering, TempCluster cur, Cluster<DendrogramModel> clus, boolean flatten) {
  for(TempCluster child : cur.children) {
   if(flatten || child.totalStability() < 0) {
    temp.members.addDBIDs(child.members);
    collectChildren(temp, clustering, child, clus, flatten);
   }
   else {
    finalizeCluster(child, clustering, clus, true);
   }
  }
 }
}
origin: de.lmu.ifi.dbs.elki/elki

/**
 * Make the cluster for the given object
 *
 * @param clustering Parent clustering
 * @param parent Parent cluster (for hierarchical output)
 * @param flatten Flag to flatten all clusters below.
 * @param hierarchical Hierarchical outpu
 */
private void finalizeCluster(Clustering<DendrogramModel> clustering, Cluster<DendrogramModel> parent, boolean flatten, boolean hierarchical) {
 final String name = "C_" + FormatUtil.NF6.format(dist);
 Cluster<DendrogramModel> clus = new Cluster<>(name, members, new DendrogramModel(dist));
 if(hierarchical && parent != null) { // Hierarchical output
  clustering.addChildCluster(parent, clus);
 }
 else {
  clustering.addToplevelCluster(clus);
 }
 collectChildren(clustering, this, clus, flatten, hierarchical);
 members = null;
 children = null;
}
origin: elki-project/elki

 /**
  * Recursive flattening of clusters.
  *
  * @param clustering Output clustering
  * @param cur Current temporary cluster
  * @param clus Output cluster
  * @param flatten Flag to indicate everything below should be flattened.
  */
 private void collectChildren(TempCluster temp, Clustering<DendrogramModel> clustering, TempCluster cur, Cluster<DendrogramModel> clus, boolean flatten) {
  for(TempCluster child : cur.children) {
   if(flatten || child.totalStability() < 0) {
    temp.members.addDBIDs(child.members);
    collectChildren(temp, clustering, child, clus, flatten);
   }
   else {
    finalizeCluster(child, clustering, clus, true);
   }
  }
 }
}
origin: de.lmu.ifi.dbs.elki/elki

/**
 * Cluster containing two existing clusters.
 *
 * @param dist Distance
 * @param a First cluster
 * @param b Second cluster
 */
public TempCluster(double dist, TempCluster a, TempCluster b) {
 this.dist = dist;
 this.children.add(a);
 this.children.add(b);
 this.childrenTotal = a.totalElements() + b.totalElements();
 this.aggregate = this.childrenTotal / dist;
}
origin: elki-project/elki

/**
 * Cluster containing two existing clusters.
 *
 * @param dist Distance
 * @param a First cluster
 * @param b Second cluster
 */
public TempCluster(double dist, TempCluster a, TempCluster b) {
 this.dist = dist;
 this.children.add(a);
 this.children.add(b);
 this.childrenTotal = a.totalElements() + b.totalElements();
 this.aggregate = this.childrenTotal / dist;
}
origin: de.lmu.ifi.dbs.elki/elki-clustering

/**
 * Spurious, also for non-materialized clusters.
 *
 * @param clus Cluster, may be {@code null} for 1-element clusters.
 * @param isCore Core property
 * @return {@code true} if spurious.
 */
private boolean isSpurious(TempCluster clus, boolean isCore) {
 return clus != null ? clus.isSpurious(minClSize) : (minClSize > 1 || !isCore);
}
origin: de.lmu.ifi.dbs.elki/elki

/**
 * Spurious, also for non-materialized clusters.
 *
 * @param clus Cluster, may be {@code null} for 1-element clusters.
 * @param isCore Core property
 * @return {@code true} if spurious.
 */
private boolean isSpurious(TempCluster clus, boolean isCore) {
 return clus != null ? clus.isSpurious(minClSize) : (minClSize > 1 || !isCore);
}
origin: de.lmu.ifi.dbs.elki/elki

/**
 * Excess of mass measure.
 *
 * @return Excess of mass
 */
public double totalStability() {
 double stability = excessOfMass();
 double cstab = 0.;
 for(TempCluster child : children) {
  cstab += Math.abs(child.totalStability());
 }
 return stability > cstab ? stability : -cstab;
}
origin: elki-project/elki

/**
 * Spurious, also for non-materialized clusters.
 *
 * @param clus Cluster, may be {@code null} for 1-element clusters.
 * @param isCore Core property
 * @return {@code true} if spurious.
 */
private boolean isSpurious(TempCluster clus, boolean isCore) {
 return clus != null ? clus.isSpurious(minClSize) : (minClSize > 1 || !isCore);
}
origin: de.lmu.ifi.dbs.elki/elki-clustering

/**
 * Excess of mass measure.
 *
 * @return Excess of mass
 */
public double excessOfMass() {
 return aggregate - totalElements() / dist;
}
origin: de.lmu.ifi.dbs.elki/elki

/**
 * Excess of mass measure.
 *
 * @return Excess of mass
 */
public double excessOfMass() {
 return aggregate - totalElements() / dist;
}
origin: de.lmu.ifi.dbs.elki/elki

/**
 * Reset the aggregate (for spurious clusters).
 *
 * @return {@code this}
 */
public TempCluster resetAggregate() {
 aggregate = totalElements() / dist;
 return this;
}
origin: de.lmu.ifi.dbs.elki/elki-clustering

/**
 * Excess of mass measure.
 *
 * @return Excess of mass
 */
public double totalStability() {
 double stability = excessOfMass();
 double cstab = 0.;
 for(TempCluster child : children) {
  cstab += Math.abs(child.totalStability());
 }
 return stability > cstab ? stability : -cstab;
}
origin: elki-project/elki

/**
 * Excess of mass measure.
 *
 * @return Excess of mass
 */
public double excessOfMass() {
 return aggregate - totalElements() / dist;
}
de.lmu.ifi.dbs.elki.algorithm.clustering.hierarchical.extractionHDBSCANHierarchyExtraction$TempCluster

Javadoc

Temporary cluster.

Most used methods

  • <init>
    Constructor.
  • excessOfMass
    Excess of mass measure.
  • grow
    Add new objects to the cluster.
  • isSpurious
    Test if a cluster is spurious.
  • resetAggregate
    Reset the aggregate (for spurious clusters).
  • totalElements
    Total number of elements in this subtree.
  • totalStability
    Excess of mass measure.
  • collectChildren
    Recursive flattening of clusters.
  • finalizeCluster
    Make the cluster for the given object

Popular in Java

  • Creating JSON documents from java classes using gson
  • onCreateOptionsMenu (Activity)
  • getSharedPreferences (Context)
  • getSupportFragmentManager (FragmentActivity)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • JComboBox (javax.swing)
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now