public interface Classifier
Interface of Text Classifier
Copyright: Copyright (c) 2005
Company: IST, Drexel University
| Modifier and Type | Method and Description |
|---|---|
DocClassSet |
classify(DocClass testingDocs)
This method uses the trained model to classify the testing documents.
|
DocClassSet |
classify(DocClassSet trainingDocSet,
DocClass testingDocs)
This method trains the classifier with the training document set and then using the trained model to classify the testing documents.
|
DocClassSet |
classify(DocClassSet trainingDocSet,
DocClassSet validatingDocSet,
DocClass testingDocs) |
int |
classify(IRDoc doc)
Classify one particular document
|
int |
classify(Row doc)
Classify one particular document
|
String |
getClassLabel(int index)
Gets the label of a given document category
|
FeatureSelector |
getFeatureSelector() |
IndexReader |
getIndexReader() |
int[] |
rank()
Rank all class labels.
|
void |
saveModel(String modelFile)
Save the trained classifier model to a file which can be used to restore the classifier later.
|
void |
setFeatureSelector(FeatureSelector selector) |
void |
train(DocClassSet trainingDocSet)
This method trains the classifier with the training document set.
|
void |
train(DocClassSet trainingDocSet,
DocClassSet validatingDocSet)
This method trains the classifier with the training document set and validating document set.
|
IndexReader getIndexReader()
FeatureSelector getFeatureSelector()
void setFeatureSelector(FeatureSelector selector)
selector - the feature selector for the classifier.void train(DocClassSet trainingDocSet)
trainingDocSet - training document setvoid train(DocClassSet trainingDocSet, DocClassSet validatingDocSet)
trainingDocSet - training document setvalidatingDocSet - validating document setDocClassSet classify(DocClass testingDocs)
testingDocs - testing document setDocClassSet classify(DocClassSet trainingDocSet, DocClass testingDocs)
trainingDocSet - training document settestingDocs - testing document setDocClassSet classify(DocClassSet trainingDocSet, DocClassSet validatingDocSet, DocClass testingDocs)
trainingDocSet - the training document setvalidatingDocSet - the validation document set, usually for avoiding the overfitting problemtestingDocs - the testing document setint classify(IRDoc doc)
doc - the index of the document is stored in the IRDoc objectint classify(Row doc)
doc - document represented by a Row objectString getClassLabel(int index)
index - the index of the categoryint[] rank()
void saveModel(String modelFile)
modelFile - output file nameCopyright © 2018 JULIE Lab, Germany. All rights reserved.