Codota Logo
ORCLUS$ProjectedEnergy.<init>
Code IndexAdd Codota to your IDE (free)

How to use
de.lmu.ifi.dbs.elki.algorithm.clustering.correlation.ORCLUS$ProjectedEnergy
constructor

Best Java code snippets using de.lmu.ifi.dbs.elki.algorithm.clustering.correlation.ORCLUS$ProjectedEnergy.<init> (Showing top 3 results out of 315)

  • Common ways to obtain ORCLUS$ProjectedEnergy
private void myMethod () {
ORCLUS$ProjectedEnergy o =
  • Codota IconORCLUS oRCLUS;ORCLUS.ORCLUSCluster oRCLUSORCLUSCluster;new ProjectedEnergy(oRCLUS, int1, int2, oRCLUSORCLUSCluster)
  • Smart code suggestions by Codota
}
origin: elki-project/elki

/**
 * Computes the projected energy of the specified clusters. The projected
 * energy is given by the mean square distance of the points to the centroid
 * of the union cluster c, when all points in c are projected to the subspace
 * of c.
 * 
 * @param relation the relation holding the objects
 * @param c_i the first cluster
 * @param c_j the second cluster
 * @param i the index of cluster c_i in the cluster list
 * @param j the index of cluster c_j in the cluster list
 * @param dim the dimensionality of the clusters
 * @return the projected energy of the specified cluster
 */
private ProjectedEnergy projectedEnergy(Relation<V> relation, ORCLUSCluster c_i, ORCLUSCluster c_j, int i, int j, int dim) {
 NumberVectorDistanceFunction<? super V> distFunc = SquaredEuclideanDistanceFunction.STATIC;
 // union of cluster c_i and c_j
 ORCLUSCluster c_ij = union(relation, c_i, c_j, dim);
 double sum = 0.;
 NumberVector c_proj = DoubleVector.wrap(project(c_ij, c_ij.centroid));
 for(DBIDIter iter = c_ij.objectIDs.iter(); iter.valid(); iter.advance()) {
  NumberVector o_proj = DoubleVector.wrap(project(c_ij, relation.get(iter).toArray()));
  sum += distFunc.distance(o_proj, c_proj);
 }
 sum /= c_ij.objectIDs.size();
 return new ProjectedEnergy(i, j, c_ij, sum);
}
origin: de.lmu.ifi.dbs.elki/elki-clustering

/**
 * Computes the projected energy of the specified clusters. The projected
 * energy is given by the mean square distance of the points to the centroid
 * of the union cluster c, when all points in c are projected to the subspace
 * of c.
 * 
 * @param relation the relation holding the objects
 * @param c_i the first cluster
 * @param c_j the second cluster
 * @param i the index of cluster c_i in the cluster list
 * @param j the index of cluster c_j in the cluster list
 * @param dim the dimensionality of the clusters
 * @return the projected energy of the specified cluster
 */
private ProjectedEnergy projectedEnergy(Relation<V> relation, ORCLUSCluster c_i, ORCLUSCluster c_j, int i, int j, int dim) {
 NumberVectorDistanceFunction<? super V> distFunc = SquaredEuclideanDistanceFunction.STATIC;
 // union of cluster c_i and c_j
 ORCLUSCluster c_ij = union(relation, c_i, c_j, dim);
 double sum = 0.;
 NumberVector c_proj = DoubleVector.wrap(project(c_ij, c_ij.centroid));
 for(DBIDIter iter = c_ij.objectIDs.iter(); iter.valid(); iter.advance()) {
  NumberVector o_proj = DoubleVector.wrap(project(c_ij, relation.get(iter).toArray()));
  sum += distFunc.distance(o_proj, c_proj);
 }
 sum /= c_ij.objectIDs.size();
 return new ProjectedEnergy(i, j, c_ij, sum);
}
origin: de.lmu.ifi.dbs.elki/elki

/**
 * Computes the projected energy of the specified clusters. The projected
 * energy is given by the mean square distance of the points to the centroid
 * of the union cluster c, when all points in c are projected to the subspace
 * of c.
 * 
 * @param database the database holding the objects
 * @param distFunc the distance function
 * @param c_i the first cluster
 * @param c_j the second cluster
 * @param i the index of cluster c_i in the cluster list
 * @param j the index of cluster c_j in the cluster list
 * @param dim the dimensionality of the clusters
 * @return the projected energy of the specified cluster
 */
private ProjectedEnergy projectedEnergy(Relation<V> database, DistanceQuery<V> distFunc, ORCLUSCluster c_i, ORCLUSCluster c_j, int i, int j, int dim) {
 // union of cluster c_i and c_j
 ORCLUSCluster c_ij = union(database, distFunc, c_i, c_j, dim);
 NumberVector.Factory<V> factory = RelationUtil.getNumberVectorFactory(database);
 double sum = 0.;
 V c_proj = projection(c_ij, c_ij.centroid, factory);
 for(DBIDIter iter = c_ij.objectIDs.iter(); iter.valid(); iter.advance()) {
  V o_proj = projection(c_ij, database.get(iter), factory);
  double dist = distFunc.distance(o_proj, c_proj);
  sum += dist * dist;
 }
 sum /= c_ij.objectIDs.size();
 return new ProjectedEnergy(i, j, c_ij, sum);
}
de.lmu.ifi.dbs.elki.algorithm.clustering.correlationORCLUS$ProjectedEnergy<init>

Popular methods of ORCLUS$ProjectedEnergy

    Popular in Java

    • Creating JSON documents from java classes using gson
    • scheduleAtFixedRate (ScheduledExecutorService)
    • onRequestPermissionsResult (Fragment)
    • startActivity (Activity)
    • GridLayout (java.awt)
      The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
    • FileReader (java.io)
      A specialized Reader that reads from a file in the file system. All read requests made by calling me
    • Random (java.util)
      This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
    • Logger (org.apache.log4j)
      This is the central class in the log4j package. Most logging operations, except configuration, are d
    • IsNull (org.hamcrest.core)
      Is the value null?
    • DateTimeFormat (org.joda.time.format)
      Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
    Codota Logo
    • Products

      Search for Java codeSearch for JavaScript codeEnterprise
    • IDE Plugins

      IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Codota for your IDE now