Examples of stringAt()


Examples of org.apache.mahout.common.StringTuple.stringAt()

        return "trainer-termDocCount/" + name;
      }
    } else if (key.length() == 2) {
      if (key.stringAt(0).equals(BayesConstants.FEATURE_COUNT)) {
        return "trainer-featureCount/" + name;
      } else if (key.stringAt(0).equals(BayesConstants.LABEL_COUNT)) {
        return "trainer-docCount/" + name;
      }
    }
    throw new IllegalArgumentException("Unrecognized Tuple: " + key);
  }
View Full Code Here

Examples of org.apache.mahout.common.StringTuple.stringAt()

      SequenceFile.Reader reader = new SequenceFile.Reader(fs, path, conf);
     
      // the key is label,feature
      while (reader.next(key, value)) {
       
        datastore.loadFeatureWeight(key.stringAt(2), key.stringAt(1), value.get());
       
      }
    }
  }
 
View Full Code Here

Examples of org.apache.mahout.common.StringTuple.stringAt()

      SequenceFile.Reader reader = new SequenceFile.Reader(fs, path, conf);
     
      // the key is label,feature
      while (reader.next(key, value)) {
       
        datastore.loadFeatureWeight(key.stringAt(2), key.stringAt(1), value.get());
       
      }
    }
  }
 
View Full Code Here

Examples of org.apache.mahout.common.StringTuple.stringAt()

     
      // the key is either _label_ or label,feature
      long count = 0;
      while (reader.next(key, value)) {
        // Sum of weights for a Feature
        if (key.stringAt(0).equals(BayesConstants.FEATURE_SUM)) {
          datastore.setSumFeatureWeight(key.stringAt(1), value.get());
          count++;
          if (count % 50000 == 0) {
            log.info("Read {} feature weights", count);
          }
View Full Code Here

Examples of org.apache.mahout.common.StringTuple.stringAt()

      // the key is either _label_ or label,feature
      long count = 0;
      while (reader.next(key, value)) {
        // Sum of weights for a Feature
        if (key.stringAt(0).equals(BayesConstants.FEATURE_SUM)) {
          datastore.setSumFeatureWeight(key.stringAt(1), value.get());
          count++;
          if (count % 50000 == 0) {
            log.info("Read {} feature weights", count);
          }
        }
View Full Code Here

Examples of org.apache.mahout.common.StringTuple.stringAt()

      SequenceFile.Reader reader = new SequenceFile.Reader(fs, path, conf);
     
      long count = 0;
      while (reader.next(key, value)) {
        // Sum of weights in a Label
        if (key.stringAt(0).equals(BayesConstants.LABEL_SUM)) {
          datastore.setSumLabelWeight(key.stringAt(1), value.get());
          count++;
          if (count % 10000 == 0) {
            log.info("Read {} label weights", count);
          }
View Full Code Here

Examples of org.apache.mahout.common.StringTuple.stringAt()

     
      long count = 0;
      while (reader.next(key, value)) {
        // Sum of weights in a Label
        if (key.stringAt(0).equals(BayesConstants.LABEL_SUM)) {
          datastore.setSumLabelWeight(key.stringAt(1), value.get());
          count++;
          if (count % 10000 == 0) {
            log.info("Read {} label weights", count);
          }
        }
View Full Code Here

Examples of org.apache.mahout.common.StringTuple.stringAt()

      SequenceFile.Reader reader = new SequenceFile.Reader(fs, path, conf);
     
      long count = 0;
      while (reader.next(key, value)) {
        // Sum of weights in a Label
        if (key.stringAt(0).equals(BayesConstants.LABEL_THETA_NORMALIZER)) {
          datastore.setThetaNormalizer(key.stringAt(1), value.get());
          count++;
          if (count % 50000 == 0) {
            log.info("Read {} theta norms", count);
          }
View Full Code Here

Examples of org.apache.mahout.common.StringTuple.stringAt()

     
      long count = 0;
      while (reader.next(key, value)) {
        // Sum of weights in a Label
        if (key.stringAt(0).equals(BayesConstants.LABEL_THETA_NORMALIZER)) {
          datastore.setThetaNormalizer(key.stringAt(1), value.get());
          count++;
          if (count % 50000 == 0) {
            log.info("Read {} theta norms", count);
          }
        }
View Full Code Here

Examples of org.apache.mahout.common.StringTuple.stringAt()

      SequenceFile.Reader reader = new SequenceFile.Reader(fs, path, conf);
     
      // the key is _label
      while (reader.next(key, value)) {
       
        if (key.stringAt(0).equals(BayesConstants.TOTAL_SUM)) { // Sum of
          // weights for
          // all Features and all Labels
          datastore.setSigmaJSigmaK(value.get());
          log.info("{}", value.get());
        }
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.