org.apache.mahout.classifier
Class NewsgroupHelper
java.lang.Object
org.apache.mahout.classifier.NewsgroupHelper
public final class NewsgroupHelper
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FEATURES
public static final int FEATURES
- See Also:
- Constant Field Values
NewsgroupHelper
public NewsgroupHelper()
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.