Examples of userSpecified()


Examples of com.martiansoftware.jsap.JSAPResult.userSpecified()

    // Build initial candidate
    Candidate initialCandidate;
    if (jsapResult.userSpecified("init-explicit")) {
      initialCandidate = new Candidate(tree, Util.split(jsapResult.getString("init-explicit")), null, null);

    } else if (jsapResult.userSpecified("init-all-level")) {
      initialCandidate = Candidate.createFixedLevelCandidate(tree, jsapResult.getInt("init-all-level"));

    } else if (jsapResult.getBoolean("init-all-leaves")) {
      initialCandidate = Candidate.createLeafCandidate(tree);
View Full Code Here

Examples of com.martiansoftware.jsap.JSAPResult.userSpecified()

    // Set learning parameters
    Class<SearchStrategy> strategy = (Class<SearchStrategy>) Class.forName(SearchStrategy.class.getPackage().getName() + "." + jsapResult.getString("search-method"));
    logger.debug("Search strategy is " + strategy);

    double weight1 = -1;
    if (jsapResult.userSpecified("search-method-weight-1")) {
      weight1 = jsapResult.getDouble("search-method-weight-1");
      logger.info("Will use weight1=" + weight1);
    }
    int maxIterations = -1;
    if (jsapResult.userSpecified("max-iterations")) {
View Full Code Here

Examples of com.martiansoftware.jsap.JSAPResult.userSpecified()

    if (jsapResult.userSpecified("search-method-weight-1")) {
      weight1 = jsapResult.getDouble("search-method-weight-1");
      logger.info("Will use weight1=" + weight1);
    }
    int maxIterations = -1;
    if (jsapResult.userSpecified("max-iterations")) {
      maxIterations = jsapResult.getInt("max-iterations");
      logger.info("Will use maxIterations=" + maxIterations);
    }
    int batchSize = -1;
    if (jsapResult.userSpecified("batch-size")) {
View Full Code Here

Examples of com.martiansoftware.jsap.JSAPResult.userSpecified()

    if (jsapResult.userSpecified("max-iterations")) {
      maxIterations = jsapResult.getInt("max-iterations");
      logger.info("Will use maxIterations=" + maxIterations);
    }
    int batchSize = -1;
    if (jsapResult.userSpecified("batch-size")) {
      batchSize = jsapResult.getInt("batch-size");
      logger.info("Will use batchSize=" + batchSize);
    }

    // Do the clustering
View Full Code Here

Examples of com.martiansoftware.jsap.JSAPResult.userSpecified()

    // Write clusters
    clustering.printClusterAssignment(outFileName);

    // Write models
    if (jsapResult.userSpecified("output-models-basename")) {

      final String outModelsBasename = jsapResult.getString("output-models-basename");
      clustering.printModels(outModelsBasename);

    } else {
View Full Code Here

Examples of com.martiansoftware.jsap.JSAPResult.userSpecified()

    File modelFile = new File(jsapResult.getString("model-file"));
    File taxoFile = new File(jsapResult.getString("taxonomy-file"));
    StateSet stateSet = new StateSet(modelFile, new Taxonomy(taxoFile));
    Model hmm = new Model(modelFile, stateSet);

    if (jsapResult.userSpecified("input-file")) {
      File inputFile = new File(jsapResult.getString("input-file"));
      BufferedReader br = new BufferedReader(new FileReader(inputFile));

      String sequenceStr;
      double logProb = 0.0;
View Full Code Here

Examples of com.martiansoftware.jsap.JSAPResult.userSpecified()

        logProb += hmm.viterbiCalculateNonOverlap(sequenceStr);
        seqCount++;
      }
      logger.info("Log probability = " + logProb);

    } else if (jsapResult.userSpecified("sequence")) {
      String sequenceStr = jsapResult.getString("sequence");
      logger.info("Probability = " + Math.exp(hmm.viterbiCalculateNonOverlap(sequenceStr)));

    } else {
      throw new IllegalArgumentException("You must specify either an input file or a sequence");
View Full Code Here

Examples of com.martiansoftware.jsap.JSAPResult.userSpecified()

    File inputFile = new File(jsapResult.getString("input-file"));
    File taxoFile = new File(jsapResult.getString("taxonomy-file"));
    Taxonomy tree = new Taxonomy(taxoFile);
    Candidate initialCandidate;

    if (jsapResult.userSpecified("init-explicit")) {
      initialCandidate = new Candidate(tree, Util.split(jsapResult.getString("init-explicit")), null, null);

    } else if (jsapResult.userSpecified("init-all-level")) {
      initialCandidate = Candidate.createFixedLevelCandidate(tree, jsapResult.getInt("init-all-level"));
     
View Full Code Here

Examples of com.martiansoftware.jsap.JSAPResult.userSpecified()

    Candidate initialCandidate;

    if (jsapResult.userSpecified("init-explicit")) {
      initialCandidate = new Candidate(tree, Util.split(jsapResult.getString("init-explicit")), null, null);

    } else if (jsapResult.userSpecified("init-all-level")) {
      initialCandidate = Candidate.createFixedLevelCandidate(tree, jsapResult.getInt("init-all-level"));
     
    } else if (jsapResult.getBoolean("init-all-leaves")) {
      initialCandidate = Candidate.createLeafCandidate(tree);
View Full Code Here

Examples of com.martiansoftware.jsap.JSAPResult.userSpecified()

   
    Class<SearchStrategy> strategy = (Class<SearchStrategy>) Class.forName(SearchStrategy.class.getPackage().getName() + "." + jsapResult.getString("search-method"));
    logger.debug("Search strategy is " + strategy );
   
    double weight1 = jsapResult.getDouble("search-method-weight-1");
    if( jsapResult.userSpecified("search-method-weight-1") ) {
      logger.info( "Will use weight1=" + weight1 );
    }
   
    // Read input file
    logger.info("Reading input file");
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.