Package com.yahoo.labs.taxomo.util

Examples of com.yahoo.labs.taxomo.util.SymbolTransitionFrequencies


  SymbolTransitionFrequencies[] getFrequencyTables() throws IOException {
    logger.info("Reading the elements to update per-cluster frequency tables");

    // Create empty frequency tables
    SymbolTransitionFrequencies symbolFrequencyTable[] = new SymbolTransitionFrequencies[nClusters];
    for (int i = 0; i < nClusters; i++) {
      symbolFrequencyTable[i] = new SymbolTransitionFrequencies(tree);
    }

    // Read input file line by line
    BufferedReader reader = new BufferedReader(new FileReader(inFile));
    String line;
View Full Code Here


    // Clear auxiliary vector
    Arrays.fill(aux, 0);

    // Update frequency tables
    SymbolTransitionFrequencies symbolFrequencyTables[] = getFrequencyTables();

    // Get best models
    learnModelSettingBestModel(symbolFrequencyTables);

    // Evaluate nearest-neighbors
View Full Code Here

      logger.info( "Will use weight1=" + weight1 );
    }
   
    // Read input file
    logger.info("Reading input file");
    SymbolTransitionFrequencies symbolTransitions = new SymbolTransitionFrequencies(tree);
    symbolTransitions.processFile(inputFile);

    // Learning
    LearnModel learner = new LearnModel(tree, symbolTransitions, initialCandidate, strategy, weight1);
    if (jsapResult.userSpecified("max-iterations")) {
      learner.setMaxIterations(jsapResult.getInt("max-iterations"));
View Full Code Here

  Class<SearchStrategy> strategy;

  @Before
  public void setUp() throws Exception {
    taxo1 = new Taxonomy(TAXOFILE1, LearnModelTest.class.getResourceAsStream(TAXOFILE1));
    sym1 = new SymbolTransitionFrequencies(taxo1);
    sym1.processStream(LearnModelTest.class.getResourceAsStream(SEQFILE1));
    LearnModel.logger.setLevel(Level.ERROR);
    strategy = getStrategy(CloserToOrigin.class.getName());
  }
View Full Code Here

TOP

Related Classes of com.yahoo.labs.taxomo.util.SymbolTransitionFrequencies

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.