Package org.apache.mahout.clustering

Examples of org.apache.mahout.clustering.DistanceMeasureCluster


    Vector prototype = getModelPrototype().get().like();
    for (int i = 0; i < prototype.size(); i++) {
      prototype.setQuick(i, UncommonDistributions.rNorm(0, 1));
    }
    for (int i = 0; i < howMany; i++) {
      result[i] = new DistanceMeasureCluster(prototype, i, measure);
    }
    return result;
  }
View Full Code Here


  @Override
  public Model<VectorWritable>[] sampleFromPrior(int howMany) {
    Model<VectorWritable>[] result = new DistanceMeasureCluster[howMany];
    for (int i = 0; i < howMany; i++) {
      Vector prototype = getModelPrototype().get();
      result[i] = new DistanceMeasureCluster(prototype.like(), i, measure);
    }
    return result;
  }
View Full Code Here

  @Override
  public Model<VectorWritable>[] sampleFromPosterior(Model<VectorWritable>[] posterior) {
    Model<VectorWritable>[] result = new DistanceMeasureCluster[posterior.length];
    for (int i = 0; i < posterior.length; i++) {
      DistanceMeasureCluster m = (DistanceMeasureCluster) posterior[i];
      result[i] = m.sampleFromPosterior();
    }
    return result;
  }
View Full Code Here

  @Override
  public Model<VectorWritable>[] sampleFromPrior(int howMany) {
    Model<VectorWritable>[] result = new DistanceMeasureCluster[howMany];
    for (int i = 0; i < howMany; i++) {
      Vector prototype = getModelPrototype().get();
      result[i] = new DistanceMeasureCluster(prototype.like(), i, measure);
    }
    return result;
  }
View Full Code Here

TOP

Related Classes of org.apache.mahout.clustering.DistanceMeasureCluster

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.