de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.KMeans.getDistanceFunction()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(5.3k)|赞(0)|评价(0)|浏览(164)

本文整理了Java中de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.KMeans.getDistanceFunction()方法的一些代码示例,展示了KMeans.getDistanceFunction()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。KMeans.getDistanceFunction()方法的具体详情如下:
包路径:de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.KMeans
类名称:KMeans
方法名:getDistanceFunction

KMeans.getDistanceFunction介绍

暂无

代码示例

代码示例来源:origin: elki-project/elki

@Override
public DistanceFunction<? super V> getDistanceFunction() {
 return innerkMeans.getDistanceFunction();
}

代码示例来源:origin: de.lmu.ifi.dbs.elki/elki-clustering

@Override
public DistanceFunction<? super V> getDistanceFunction() {
 return innerkMeans.getDistanceFunction();
}

代码示例来源:origin: de.lmu.ifi.dbs.elki/elki

@Override
public DistanceFunction<? super V> getDistanceFunction() {
 return innerkMeans.getDistanceFunction();
}

代码示例来源:origin: de.lmu.ifi.dbs.elki/elki

@Override
public DistanceFunction<? super V> getDistanceFunction() {
 return innerkMeans.getDistanceFunction();
}

代码示例来源:origin: elki-project/elki

@Override
public DistanceFunction<? super V> getDistanceFunction() {
 return innerkMeans.getDistanceFunction();
}

代码示例来源:origin: de.lmu.ifi.dbs.elki/elki-clustering

@Override
public DistanceFunction<? super V> getDistanceFunction() {
 return innerkMeans.getDistanceFunction();
}

代码示例来源:origin: elki-project/elki

@Override
public TypeInformation[] getInputTypeRestriction() {
 return TypeUtil.array(clusterer.getDistanceFunction().getInputTypeRestriction());
}

代码示例来源:origin: de.lmu.ifi.dbs.elki/elki

@Override
public TypeInformation[] getInputTypeRestriction() {
 return TypeUtil.array(clusterer.getDistanceFunction().getInputTypeRestriction());
}

代码示例来源:origin: elki-project/elki

@Override
public Clustering<M> run(Database database, Relation<V> relation) {
 if(!(innerkMeans.getDistanceFunction() instanceof PrimitiveDistanceFunction)) {
  throw new AbortException("K-Means results can only be evaluated for primitive distance functions, got: " + innerkMeans.getDistanceFunction().getClass());
 }
 @SuppressWarnings("unchecked")
 final NumberVectorDistanceFunction<? super NumberVector> df = (NumberVectorDistanceFunction<? super NumberVector>) innerkMeans.getDistanceFunction();
 Clustering<M> bestResult = null;
 double bestCost = Double.NaN;
 FiniteProgress prog = LOG.isVerbose() ? new FiniteProgress("K-means iterations", trials, LOG) : null;
 for(int i = 0; i < trials; i++) {
  Clustering<M> currentCandidate = innerkMeans.run(database, relation);
  double currentCost = qualityMeasure.quality(currentCandidate, df, relation);
  LOG.verbose("Cost of candidate " + i + ": " + currentCost);
  if(qualityMeasure.isBetter(currentCost, bestCost)) {
   bestResult = currentCandidate;
   bestCost = currentCost;
  }
  LOG.incrementProcessed(prog);
 }
 LOG.ensureCompleted(prog);
 return bestResult;
}

代码示例来源:origin: de.lmu.ifi.dbs.elki/elki-clustering

@Override
public Clustering<M> run(Database database, Relation<V> relation) {
 if(!(innerkMeans.getDistanceFunction() instanceof PrimitiveDistanceFunction)) {
  throw new AbortException("K-Means results can only be evaluated for primitive distance functions, got: " + innerkMeans.getDistanceFunction().getClass());
 }
 @SuppressWarnings("unchecked")
 final NumberVectorDistanceFunction<? super NumberVector> df = (NumberVectorDistanceFunction<? super NumberVector>) innerkMeans.getDistanceFunction();
 Clustering<M> bestResult = null;
 double bestCost = Double.NaN;
 FiniteProgress prog = LOG.isVerbose() ? new FiniteProgress("K-means iterations", trials, LOG) : null;
 for(int i = 0; i < trials; i++) {
  Clustering<M> currentCandidate = innerkMeans.run(database, relation);
  double currentCost = qualityMeasure.quality(currentCandidate, df, relation);
  LOG.verbose("Cost of candidate " + i + ": " + currentCost);
  if(qualityMeasure.isBetter(currentCost, bestCost)) {
   bestResult = currentCandidate;
   bestCost = currentCost;
  }
  LOG.incrementProcessed(prog);
 }
 LOG.ensureCompleted(prog);
 return bestResult;
}

代码示例来源:origin: de.lmu.ifi.dbs.elki/elki

@Override
public Clustering<M> run(Database database, Relation<V> relation) {
 if(!(innerkMeans.getDistanceFunction() instanceof PrimitiveDistanceFunction)) {
  throw new AbortException("K-Means results can only be evaluated for primitive distance functions, got: " + innerkMeans.getDistanceFunction().getClass());
 }
 @SuppressWarnings("unchecked")
 final NumberVectorDistanceFunction<? super NumberVector> df = (NumberVectorDistanceFunction<? super NumberVector>) innerkMeans.getDistanceFunction();
 Clustering<M> bestResult = null;
 double bestCost = Double.NaN;
 FiniteProgress prog = LOG.isVerbose() ? new FiniteProgress("K-means iterations", trials, LOG) : null;
 for(int i = 0; i < trials; i++) {
  Clustering<M> currentCandidate = innerkMeans.run(database, relation);
  double currentCost = qualityMeasure.quality(currentCandidate, df, relation);
  if(LOG.isVerbose()) {
   LOG.verbose("Cost of candidate " + i + ": " + currentCost);
  }
  if(qualityMeasure.isBetter(currentCost, bestCost)) {
   bestResult = currentCandidate;
   bestCost = currentCost;
  }
  LOG.incrementProcessed(prog);
 }
 LOG.ensureCompleted(prog);
 return bestResult;
}

代码示例来源:origin: elki-project/elki

DistanceFunction<? super O> df = clusterer.getDistanceFunction();
DistanceQuery<O> dq = database.getDistanceQuery(relation, df);

代码示例来源:origin: de.lmu.ifi.dbs.elki/elki

DistanceFunction<? super O> df = clusterer.getDistanceFunction();
DistanceQuery<O> dq = database.getDistanceQuery(relation, df);

相关文章