|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.wikipedia.miner.comparison.ConnectionSnippetWeighter
public class ConnectionSnippetWeighter
| Constructor Summary | |
|---|---|
ConnectionSnippetWeighter(Wikipedia wikipedia,
ArticleComparer cmp)
|
|
| Method Summary | |
|---|---|
void |
buildClassifier(Classifier classifier)
|
void |
buildDefaultClassifier()
|
double |
getWeight(ConnectionSnippet snippet)
|
void |
loadClassifier(java.io.File file)
Loads the classifier from file |
void |
loadTrainingData(java.io.File file)
Loads training data from the given file. |
void |
saveClassifier(java.io.File file)
Serializes the classifer and saves it to the given file. |
void |
saveTrainingData(java.io.File file)
Saves the training data generated by train() to the given file. |
SpearmanCorrelation |
test(java.util.Vector<ConnectionSnippet> weightedSnippets)
|
void |
train(java.util.Vector<ConnectionSnippet> weightedSnippets)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConnectionSnippetWeighter(Wikipedia wikipedia,
ArticleComparer cmp)
throws java.lang.Exception
java.lang.Exception| Method Detail |
|---|
public double getWeight(ConnectionSnippet snippet)
throws java.lang.Exception
java.lang.Exception
public void train(java.util.Vector<ConnectionSnippet> weightedSnippets)
throws java.lang.Exception
java.lang.Exception
public SpearmanCorrelation test(java.util.Vector<ConnectionSnippet> weightedSnippets)
throws java.lang.Exception
java.lang.Exception
public void saveTrainingData(java.io.File file)
throws java.io.IOException,
java.lang.Exception
file - the file to save the training data to
java.io.IOException - if the file cannot be written to
java.lang.Exception
public void loadTrainingData(java.io.File file)
throws java.io.IOException,
java.lang.Exception
file - the file to save the training data to
java.io.IOException - if the file cannot be read.
java.lang.Exception - if the file does not contain valid training data.
public void saveClassifier(java.io.File file)
throws java.io.IOException
file - the file to save the classifier to
java.io.IOException - if the file cannot be read
public void loadClassifier(java.io.File file)
throws java.lang.Exception
file -
java.lang.Exception
public void buildClassifier(Classifier classifier)
throws java.lang.Exception
classifier -
java.lang.Exception
public void buildDefaultClassifier()
throws java.lang.Exception
classifier -
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||