Examples of cluster()


Examples of edu.gslis.ttg.clusters.clusterers.SimpleJaccardClusterer.cluster()

     
      // sweep through jaccard steps, calculating F1
      double maxF1 = 0;
      double maxF1Threshold = 1;
      for (double j = 1.0; j >= 0.0; j -= stepSize) { // for each jaccard threshold step
        Clusters clusters = clusterer.cluster(j);
       
        // all clusters are created now, get a finalized set of results
        Set<Long> allResults = new HashSet<Long>(seenResults.keySet());
        allResults.removeAll(clusters.getAllClusteredResults()); // allResults includes unclustered plus one representative from each cluster
        for (Cluster c : clusters) {
View Full Code Here

Examples of edu.gslis.ttg.clusters.clusterers.SimpleJaccardClusterer.cluster()

      client = new TrecSearchThriftClient(params.getParamValue(HOST_OPTION), testingPort, group, token);
      searcher = new SimpleSearcher(client, numResults);
      Map<Long, TResult> seenResults = searcher.search(query);
     
      SimpleJaccardClusterer clusterer = new SimpleJaccardClusterer(new ArrayList<TResult>(seenResults.values()));
      Clusters clusters = clusterer.cluster(averageThreshold);
     
      // all clusters are created now, get a finalized set of results
      Set<Long> allResults = new HashSet<Long>(seenResults.keySet());
      allResults.removeAll(clusters.getAllClusteredResults()); // allResults includes unclustered plus one representative from each cluster
      for (Cluster c : clusters) {
View Full Code Here

Examples of edu.ucla.sspace.clustering.Clustering.cluster()

        Properties props = System.getProperties();
        Assignments assignments = null;
        if (sparseVectors.size() > 0) {
            SparseMatrix matrix = Matrices.asSparseMatrix(sparseVectors);
            assignments = (numClusters > 0)
                ? clustering.cluster(matrix, numClusters, props)
                : clustering.cluster(matrix, props);
        } else {
            Matrix matrix = Matrices.asMatrix(vectors);
            assignments = (numClusters > 0)
                ? clustering.cluster(matrix, numClusters, props)
View Full Code Here

Examples of edu.ucla.sspace.clustering.Clustering.cluster()

        Assignments assignments = null;
        if (sparseVectors.size() > 0) {
            SparseMatrix matrix = Matrices.asSparseMatrix(sparseVectors);
            assignments = (numClusters > 0)
                ? clustering.cluster(matrix, numClusters, props)
                : clustering.cluster(matrix, props);
        } else {
            Matrix matrix = Matrices.asMatrix(vectors);
            assignments = (numClusters > 0)
                ? clustering.cluster(matrix, numClusters, props)
                : clustering.cluster(matrix, props);
View Full Code Here

Examples of edu.ucla.sspace.clustering.Clustering.cluster()

                ? clustering.cluster(matrix, numClusters, props)
                : clustering.cluster(matrix, props);
        } else {
            Matrix matrix = Matrices.asMatrix(vectors);
            assignments = (numClusters > 0)
                ? clustering.cluster(matrix, numClusters, props)
                : clustering.cluster(matrix, props);
        }

        int a = 0;
        for (String word : words) {
View Full Code Here

Examples of edu.ucla.sspace.clustering.Clustering.cluster()

                : clustering.cluster(matrix, props);
        } else {
            Matrix matrix = Matrices.asMatrix(vectors);
            assignments = (numClusters > 0)
                ? clustering.cluster(matrix, numClusters, props)
                : clustering.cluster(matrix, props);
        }

        int a = 0;
        for (String word : words) {
            Assignment assignment = assignments.get(a++);
View Full Code Here

Examples of edu.ucla.sspace.graph.LinkClustering.cluster()

            else
                GraphIO.readUndirected(f, vertexLabels);

            LinkClustering lc = new LinkClustering();
            MultiMap<Integer,Integer> clusterToVertices =
                lc.cluster(graph, System.getProperties());

            PrintWriter pw = new PrintWriter(
                new BufferedOutputStream(new FileOutputStream(
                                         opts.getPositionalArg(1))));
View Full Code Here

Examples of net.kuujo.vertigo.network.NetworkContext.cluster()

  @SuppressWarnings("unchecked")
  private static <T extends Context<T>> T deserialize(String uri, JsonObject context) {
    ContextUri curi = new ContextUri(uri);
    NetworkContext network = SerializerFactory.getSerializer(Context.class).deserializeObject(context, NetworkContext.class);
    if (!curi.getCluster().equals(network.cluster()) || !curi.getNetwork().equals(network.name())) {
      throw new IllegalArgumentException("The given URI does not match the given context configuration");
    }

    if (curi.hasComponent()) {
      ComponentContext<?> component = network.component(curi.getComponent());
View Full Code Here

Examples of org.apache.kafka.common.requests.MetadataResponse.cluster()

    }

    private void handleMetadataResponse(RequestHeader header, Struct body, long now) {
        this.metadataFetchInProgress = false;
        MetadataResponse response = new MetadataResponse(body);
        Cluster cluster = response.cluster();
        // don't update the cluster if there are no valid nodes...the topic we want may still be in the process of being
        // created which means we will get errors and no nodes until it exists
        if (cluster.nodes().size() > 0)
            this.metadata.update(cluster, now);
        else
View Full Code Here

Examples of org.apache.mahout.clustering.dirichlet.DirichletClusterer.cluster()

    }

    DirichletClusterer dc = new DirichletClusterer(points,
        new GaussianClusterDistribution(new VectorWritable(
            new DenseVector(2))), 1.0, 10, 2, 2);
    List<Cluster[]> result = dc.cluster(20);
    for (Cluster cluster : result.get(result.size() - 1)) {
      System.out.println("Cluster id: " + cluster.getId() + " center: "
          + cluster.getCenter().asFormatString());
    }
  }
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.