public class NBClassifier
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
static int |
MIN_BOOTSTRSP_WORDS |
|
static long |
seed |
Constructor | Description |
---|---|
NBClassifier(TreeFactory f,
int[] wordList,
java.util.ArrayList<HierarchyTree> nodes,
boolean useSeed,
int min_bootstrap_words) |
Modifier and Type | Method | Description |
---|---|---|
ValidationClassificationResult |
assignClass() |
for a array of subclasses, gets the probabilities of each subclass,
returns the classification whose subclass has the highest probability.
|
ValidationClassificationResult |
assignClassRandomsample() |
This method random select certain number of words and calculate the probability
This can only be called after the assignClass() filled the querySeq_wordProbArr matrix
|
public static final int MIN_BOOTSTRSP_WORDS
public static final long seed
public NBClassifier(TreeFactory f, int[] wordList, java.util.ArrayList<HierarchyTree> nodes, boolean useSeed, int min_bootstrap_words) throws java.io.IOException
java.io.IOException
public ValidationClassificationResult assignClass()
public ValidationClassificationResult assignClassRandomsample()