|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnetkit.classifiers.io.ReadPrior
public final class ReadPrior
This class reads in class priors from a file such that a user can specify the priors rather than have the classifier use the priors that are estimated from training examples. The prior file should be of the format:
value,prior-score ...Any line that starts with '#' is ignored (treated as a comment). The 'value' in the line is the likelihood that the class attribute takes on that value. The scores are not checked to see if they add to 1.
AttributeCategorical
Constructor Summary | |
---|---|
ReadPrior()
|
Method Summary | |
---|---|
static double[] |
readPrior(java.io.BufferedReader br,
AttributeCategorical attribute)
Reads in a file using the file format mentioned in the header. |
static double[] |
readPrior(java.io.File f,
AttributeCategorical attribute)
Reads in a file using the file format mentioned in the header. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReadPrior()
Method Detail |
---|
public static double[] readPrior(java.io.File f, AttributeCategorical attribute)
f
- The file to read fromattribute
- The attribute whose prior likelihood scores are being read
AttributeExpandableCategorical
public static double[] readPrior(java.io.BufferedReader br, AttributeCategorical attribute)
f
- The file to read fromattribute
- The attribute whose prior likelihood scores are being read
AttributeExpandableCategorical
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |