本文整理了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
暂无
代码示例来源: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);
内容来源于网络,如有侵权,请联系作者删除!