Package org.apache.mahout.knn.search

Examples of org.apache.mahout.knn.search.FastProjectionSearch.search()


    sut.addAllMatrixSlicesAsWeightedVectors(data);
    log.warn("Added data with speedup of {}", numDataVectors / (dimension * 2.0 * depth * 4.0));

    long t0 = System.nanoTime();
    for (MatrixSlice query : queries) {
      List<WeightedThing<Vector>> r = sut.search(query.vector(), depth);
      Set<Integer> x = Sets.newHashSet();
      for (WeightedThing<Vector> vector : r) {
        x.add(((WeightedVector)vector.getValue()).getIndex());
      }
      double overlap = Sets.intersection(reference.get(query.index()), x).size() / (double) depth;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.