List of usage examples for org.apache.mahout.common Parameters Parameters
protected Parameters(Map<String, String> params)
From source file:com.cg.mapreduce.fpgrowth.mahout.fpm.AggregatorReducer.java
License:Apache License
@Override protected void setup(Context context) throws IOException, InterruptedException { super.setup(context); Parameters params = new Parameters(context.getConfiguration().get("pfp.parameters", "")); maxHeapSize = Integer.valueOf(params.get("maxHeapSize", "50")); }
From source file:com.cg.mapreduce.fpgrowth.mahout.fpm.ParallelCountingMapper.java
License:Apache License
@Override protected void setup(Context context) throws IOException, InterruptedException { super.setup(context); Parameters params = new Parameters(context.getConfiguration().get(PFPGrowth.PFP_PARAMETERS, "")); splitter = Pattern.compile(params.get(PFPGrowth.SPLIT_PATTERN, PFPGrowth.SPLITTER.toString())); }
From source file:com.cg.mapreduce.fpgrowth.mahout.fpm.ParallelFPGrowthMapper.java
License:Apache License
@Override protected void setup(Context context) throws IOException, InterruptedException { super.setup(context); int i = 0;/*from w w w .j a va 2s. com*/ for (Pair<String, Long> e : PFPGrowth.readFList(context.getConfiguration())) { fMap.put(e.getFirst(), i++); } Parameters params = new Parameters(context.getConfiguration().get(PFPGrowth.PFP_PARAMETERS, "")); splitter = Pattern.compile(params.get(PFPGrowth.SPLIT_PATTERN, PFPGrowth.SPLITTER.toString())); maxPerGroup = params.getInt(PFPGrowth.MAX_PER_GROUP, 0); }
From source file:com.cg.mapreduce.fpgrowth.mahout.fpm.ParallelFPGrowthReducer.java
License:Apache License
@Override protected void setup(Context context) throws IOException, InterruptedException { super.setup(context); Parameters params = new Parameters(context.getConfiguration().get(PFPGrowth.PFP_PARAMETERS, "")); for (Pair<String, Long> e : PFPGrowth.readFList(context.getConfiguration())) { featureReverseMap.add(e.getFirst()); freqList.add(e.getSecond());// w ww . jav a 2 s .c o m } maxHeapSize = Integer.valueOf(params.get(PFPGrowth.MAX_HEAPSIZE, "50")); minSupport = Integer.valueOf(params.get(PFPGrowth.MIN_SUPPORT, "3")); maxPerGroup = params.getInt(PFPGrowth.MAX_PER_GROUP, 0); numFeatures = featureReverseMap.size(); useFP2 = "true".equals(params.get(PFPGrowth.USE_FPG2)); }
From source file:com.cg.mapreduce.myfpgrowth.ParallelFPGrowthMapper.java
License:Apache License
@Override protected void setup(Context context) throws IOException, InterruptedException { super.setup(context); int i = 0;// w ww . j ava2s .c o m for (Pair<String, Long> e : readFList(context.getConfiguration())) { fList.add(new TreeNode(e.getFirst(), e.getSecond().intValue())); fMap.put(e.getFirst(), i++); } Collections.sort(fList); Parameters params = new Parameters(context.getConfiguration().get(PFPGrowth.PFP_PARAMETERS, "")); splitter = Pattern.compile(params.get(PFPGrowth.SPLIT_PATTERN, PFPGrowth.SPLITTER.toString())); maxPerGroup = params.getInt(PFPGrowth.MAX_PER_GROUP, 0); }
From source file:com.cg.mapreduce.myfpgrowth.ParallelFPGrowthReducer.java
License:Apache License
@Override protected void setup(Context context) throws IOException, InterruptedException { super.setup(context); Parameters params = new Parameters(context.getConfiguration().get(PFPGrowth.PFP_PARAMETERS, "")); minSupport = Integer.valueOf(params.get(PFPGrowth.MIN_SUPPORT, "3")); maxPerGroup = params.getInt(PFPGrowth.MAX_PER_GROUP, 0); for (Pair<String, Long> e : readFList(context.getConfiguration())) { fList.add(new TreeNode(e.getFirst(), e.getSecond().intValue())); }/*from w w w.ja v a2 s . c o m*/ }
From source file:it.polito.dbdmg.searum.itemsets.ParallelFPGrowthMapper.java
License:Apache License
@Override protected void setup(Context context) throws IOException, InterruptedException { super.setup(context); int i = 0;// www . j av a 2s .c om for (Pair<String, Long> e : ARM.readFList(context.getConfiguration())) { fMap.put(e.getFirst(), i++); } Parameters params = new Parameters(context.getConfiguration().get(ARM.PFP_PARAMETERS, "")); splitter = Pattern.compile(params.get(ARM.SPLIT_PATTERN, ARM.SPLITTER.toString())); maxPerGroup = params.getInt(ARM.MAX_PER_GROUP, 0); }
From source file:it.polito.dbdmg.searum.itemsets.ParallelFPGrowthReducer.java
License:Apache License
@Override protected void setup(Context context) throws IOException, InterruptedException { super.setup(context); Parameters params = new Parameters(context.getConfiguration().get(ARM.PFP_PARAMETERS, "")); for (Pair<String, Long> e : ARM.readFList(context.getConfiguration())) { if (!e.equals("dataset")) { featureReverseMap.add(e.getFirst()); freqList.add(e.getSecond()); }//from ww w .j ava 2 s . c o m } maxHeapSize = Integer.valueOf(params.get(ARM.MAX_HEAPSIZE, "50")); minSupport = Integer.valueOf(params.get(ARM.MIN_SUPPORT, "5")); log.info("Support count: " + minSupport); maxPerGroup = params.getInt(ARM.MAX_PER_GROUP, 0); numFeatures = featureReverseMap.size(); }
From source file:it.polito.dbdmg.searum.rules.RuleMiningReducer.java
License:Apache License
@Override protected void setup(Context context) throws IOException, InterruptedException { super.setup(context); Parameters params = new Parameters(context.getConfiguration().get("minConfidence", "")); /* Get Item Frequent List from DC */ for (Pair<String, Long> e : ARM.readFList(context.getConfiguration())) { freqItemMap.put(e.getFirst(), e.getSecond()); }//from w w w .j a v a2s.c om minConfidence = Double.valueOf(params.get("minConfidence", "0.1")); }
From source file:it.polito.dbdmg.searum.utils.ParallelCountingMapper.java
License:Apache License
@Override protected void setup(Context context) throws IOException, InterruptedException { super.setup(context); Parameters params = new Parameters(context.getConfiguration().get(ARM.PFP_PARAMETERS, "")); splitter = Pattern.compile(params.get(ARM.SPLIT_PATTERN, ARM.SPLITTER.toString())); }