edu.cmu.minorthird.classify.semisupervised
Class SemiSupervisedNaiveBayesLearner

java.lang.Object
  extended by edu.cmu.minorthird.classify.semisupervised.SemiSupervisedBatchClassifierLearner
      extended by edu.cmu.minorthird.classify.semisupervised.SemiSupervisedNaiveBayesLearner
All Implemented Interfaces:
ClassifierLearner, java.lang.Cloneable

public class SemiSupervisedNaiveBayesLearner
extends SemiSupervisedBatchClassifierLearner

Implementation of the methods described in: K. Nigam, A. McCallum, S. Thrun and T. Mitchell. Text Classifiaction from labeled and unlabeled documents using EM. W. Choen editor, Machine Learning, 1999.

Author:
Edoardo Airoldi Date: Mar 13, 2004

Field Summary
 
Fields inherited from class edu.cmu.minorthird.classify.semisupervised.SemiSupervisedBatchClassifierLearner
classifier
 
Constructor Summary
SemiSupervisedNaiveBayesLearner()
           
SemiSupervisedNaiveBayesLearner(int iterations)
           
 
Method Summary
 Classifier batchTrain(SemiSupervisedDataset dataset)
          subclasses should use this method to implement a batch supervised learning algorithm.
 ClassifierLearner copy()
          Make a copy of the learner.
 ExampleSchema getSchema()
          Returns the ExampleSchema - constraints on what the Examples will be.
static void main(java.lang.String[] args)
           
 void setInstancePool(java.util.Iterator<Instance> i)
          subclasses should use this method to get the unlabeled examples available for semi-supervised learning.
 void setSchema(ExampleSchema schema)
          Enables control on number of classes allowed to be passed to the learner
 
Methods inherited from class edu.cmu.minorthird.classify.semisupervised.SemiSupervisedBatchClassifierLearner
addExample, completeTraining, getClassifier, hasNextQuery, nextQuery, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SemiSupervisedNaiveBayesLearner

public SemiSupervisedNaiveBayesLearner()

SemiSupervisedNaiveBayesLearner

public SemiSupervisedNaiveBayesLearner(int iterations)
Method Detail

setSchema

public void setSchema(ExampleSchema schema)
Description copied from class: SemiSupervisedBatchClassifierLearner
Enables control on number of classes allowed to be passed to the learner

Specified by:
setSchema in interface ClassifierLearner
Specified by:
setSchema in class SemiSupervisedBatchClassifierLearner

setInstancePool

public void setInstancePool(java.util.Iterator<Instance> i)
Description copied from class: SemiSupervisedBatchClassifierLearner
subclasses should use this method to get the unlabeled examples available for semi-supervised learning.

Specified by:
setInstancePool in interface ClassifierLearner
Specified by:
setInstancePool in class SemiSupervisedBatchClassifierLearner

getSchema

public ExampleSchema getSchema()
Description copied from interface: ClassifierLearner
Returns the ExampleSchema - constraints on what the Examples will be.


copy

public ClassifierLearner copy()
Description copied from interface: ClassifierLearner
Make a copy of the learner. Note: This will reset the learner, erasing previous data!


batchTrain

public Classifier batchTrain(SemiSupervisedDataset dataset)
Description copied from class: SemiSupervisedBatchClassifierLearner
subclasses should use this method to implement a batch supervised learning algorithm.

Specified by:
batchTrain in class SemiSupervisedBatchClassifierLearner

main

public static void main(java.lang.String[] args)