org.apache.mahout.classifier
Class NewsgroupHelper

java.lang.Object
  extended by org.apache.mahout.classifier.NewsgroupHelper

public final class NewsgroupHelper
extends Object


Field Summary
static int FEATURES
           
 
Constructor Summary
NewsgroupHelper()
           
 
Method Summary
static void countWords(org.apache.lucene.analysis.Analyzer analyzer, Collection<String> words, Reader in, com.google.common.collect.Multiset<String> overallCounts)
           
 Vector encodeFeatureVector(File file, int actual, int leakType, com.google.common.collect.Multiset<String> overallCounts)
           
 FeatureVectorEncoder getBias()
           
 FeatureVectorEncoder getEncoder()
           
 Random getRandom()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FEATURES

public static final int FEATURES
See Also:
Constant Field Values
Constructor Detail

NewsgroupHelper

public NewsgroupHelper()
Method Detail

getEncoder

public FeatureVectorEncoder getEncoder()

getBias

public FeatureVectorEncoder getBias()

getRandom

public Random getRandom()

encodeFeatureVector

public Vector encodeFeatureVector(File file,
                                  int actual,
                                  int leakType,
                                  com.google.common.collect.Multiset<String> overallCounts)
                           throws IOException
Throws:
IOException

countWords

public static void countWords(org.apache.lucene.analysis.Analyzer analyzer,
                              Collection<String> words,
                              Reader in,
                              com.google.common.collect.Multiset<String> overallCounts)
                       throws IOException
Throws:
IOException


Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.