Examples of estimate()


Examples of cc.mallet.topics.HDP.estimate()

    //setup HDP parameters(alpha, beta, gamma, initialTopics)
    HDP hdp = new HDP(1.0, 0.1, 1.0, 10);
    hdp.initialize(instances);
   
    //set number of iterations, and display result or not
    hdp.estimate(2000);
   
    //get topic distribution for first instance
    double[] distr = hdp.topicDistribution(0);
    //print out
    for(int j=0; j<distr.length ; j++){
View Full Code Here

Examples of cc.mallet.topics.HDPInferencer.estimate()

    }
   
    //for inferencer
    HDPInferencer inferencer = hdp.getInferencer();
    inferencer.setInstance(testInstances);
    inferencer.estimate(100);
    //get topic distribution for first test instance
    distr = inferencer.topicDistribution(0);   
    //print out
    for(int j=0; j<distr.length ; j++){
      System.out.print(distr[j] + " ");
View Full Code Here

Examples of cc.mallet.topics.HierarchicalLDA.estimate()

    }

    // Initialize and start the sampler

    hlda.initialize(instances, testing, numLevels.value(), random);
    hlda.estimate(numIterations.value());
   
    // Output results

    if (stateFile.value() != null) {
      hlda.printState(new PrintWriter(stateFile.value()));
View Full Code Here

Examples of cc.mallet.topics.LDAStream.estimate()

        if (outputStateInterval.value != 0) {
            lda.setSaveState(outputStateInterval.value, stateFile.value);
        }

    lda.estimate();
    //save the model, we need typeTopicCounts and tokensPerTopic for empirical likelihood
    lda.write(new File (inputFile.value + ".model"));

    if (topicKeysFile.value != null) {
      lda.printTopWords(new File(topicKeysFile.value), topWords.value, false);
View Full Code Here

Examples of cc.mallet.topics.ParallelTopicModel.estimate()

        ParallelTopicModel model = new ParallelTopicModel(numTopics, 1.0, 0.01);
        model.addInstances(instances);
        model.setNumThreads(1); // Important, since this is being run in the reduce, just use one thread
        model.setTopicDisplay(0,0);
        model.setNumIterations(2000);
        model.estimate();

        // Get the results
        Alphabet dataAlphabet = instances.getDataAlphabet();
        ArrayList<TopicAssignment> assignments = model.getData();
View Full Code Here

Examples of com.ipeirotis.gal.scripts.DawidSkene.estimate()

              AssignedLabel l = new AssignedLabel( vote.worker, vote.unit, vote.label);
              ds.addAssignedLabel(l);
            }
        }

        ds.estimate( 20 );
       
        return ds.getMajorityVote();
    }
}
View Full Code Here

Examples of edu.brown.designer.MemoryEstimator.estimate()

        for (SiteEntry site : this.sites) {
            long site_size = 0l;
            for (FragmentEntry fragment : site.getFragments()) {
                Table catalog_tbl = fragment.getTable(catalog_db);
                Column partition_col = catalog_tbl.getPartitioncolumn();
                long size = estimator.estimate(catalog_tbl, partition_col, fragment.getHashKey());
                site_size += size;
                fragment.setEstimatedSize(size);
            } // FOR
            site.setEstimatedSize(site_size);
        } // FOR
View Full Code Here

Examples of gr.ntua.irmos.stubs.MapService_instance.MapPortType.estimate()

     
      Estimate input=new Estimate();
      input.setAscid(args[1]);
      //change dynamically to whatever input in the following format [input1;input2;...;inputn]
      input.setHlinput("[1;1;1;1]");
      String result=map.estimate(input);
      System.out.println("Current result: "+result);


    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

Examples of org.apache.commons.math.estimation.GaussNewtonEstimator.estimate()

                              new EstimatedParameter[] {
                                 new EstimatedParameter("p0", 0)
                              }, 3.0)
      });
    GaussNewtonEstimator estimator = new GaussNewtonEstimator(100, 1.0e-6, 1.0e-6);
    estimator.estimate(problem);
    assertEquals(0, estimator.getRMS(problem), 1.0e-10);
    assertEquals(1.5,
                 problem.getUnboundParameters()[0].getEstimate(),
                 1.0e-10);
   }
View Full Code Here

Examples of org.apache.commons.math.estimation.GaussNewtonEstimator.estimate()

                            new EstimatedParameter[] { x[0], x[1] },
                            1.0)
    });

    GaussNewtonEstimator estimator = new GaussNewtonEstimator(100, 1.0e-6, 1.0e-6);
    estimator.estimate(problem);
    assertEquals(0, estimator.getRMS(problem), 1.0e-10);
    assertEquals(7.0, x[0].getEstimate(), 1.0e-10);
    assertEquals(3.0, x[1].getEstimate(), 1.0e-10);

  }
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.