Package org.apache.mahout.fpm.pfpgrowth.convertors.string

Examples of org.apache.mahout.fpm.pfpgrowth.convertors.string.TopKStringPatterns


    List<Pair<String,TopKStringPatterns>> ret = Lists.newArrayList();
    // key is feature value is count
    for (Pair<Writable,TopKStringPatterns> record
         : new SequenceFileIterable<Writable,TopKStringPatterns>(path, true, conf)) {
      ret.add(new Pair<String,TopKStringPatterns>(record.getFirst().toString(),
                                                  new TopKStringPatterns(record.getSecond().getPatterns())));
    }
    return ret;
  }
View Full Code Here


        pattern.add(featureReverseMap.get(i));
      }
      stringValues.add(new Pair<List<String>,Long>(pattern, e.getSecond()));
    }
   
    collector.collect(new Text(stringKey), new TopKStringPatterns(stringValues));
  }
View Full Code Here

    for (Pair<List<String>,Long> pattern : values.getPatterns()) {
      for (String item : pattern.getFirst()) {
        List<Pair<List<String>,Long>> patternSingularList = Lists.newArrayList();
        patternSingularList.add(pattern);
        context.setStatus("Aggregator Mapper:Grouping Patterns for " + item);
        context.write(new Text(item), new TopKStringPatterns(patternSingularList));
      }
    }
   
  }
View Full Code Here

    List<Pair<String,TopKStringPatterns>> ret = Lists.newArrayList();
    // key is feature value is count
    for (Pair<Writable,TopKStringPatterns> record
         : new SequenceFileIterable<Writable,TopKStringPatterns>(path, true, conf)) {
      ret.add(new Pair<String,TopKStringPatterns>(record.getFirst().toString(),
                                                  new TopKStringPatterns(record.getSecond().getPatterns())));
    }
    return ret;
  }
View Full Code Here

    List<Pair<String,TopKStringPatterns>> ret = Lists.newArrayList();
    // key is feature value is count
    for (Pair<Writable,TopKStringPatterns> record
         : new SequenceFileIterable<Writable,TopKStringPatterns>(path, true, conf)) {
      ret.add(new Pair<String,TopKStringPatterns>(record.getFirst().toString(),
                                                  new TopKStringPatterns(record.getSecond().getPatterns())));
    }
    return ret;
  }
View Full Code Here

    List<Pair<String,TopKStringPatterns>> ret = Lists.newArrayList();
    // key is feature value is count
    for (Pair<Writable,TopKStringPatterns> record
         : new SequenceFileIterable<Writable,TopKStringPatterns>(path, true, conf)) {
      ret.add(new Pair<String,TopKStringPatterns>(record.getFirst().toString(),
                                                  new TopKStringPatterns(record.getSecond().getPatterns())));
    }
    return ret;
  }
View Full Code Here

TOP

Related Classes of org.apache.mahout.fpm.pfpgrowth.convertors.string.TopKStringPatterns

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.