docs: public String[] getOptions() {
      Vector<String>	result;
      String[]      	options;
      int           	i;
  
      result = new Vector<String>();
  
      result.add("-B");
      result.add(MOAUtils.toCommandLine(m_ActualClassifier));
  
      options = super.getOptions();
      for (i = 0; i < options.length; i++)
        result.add(options[i]);
  
      return result.toArray(new String[result.size()]);
    }
  
    /**
     * Sets the MOA classifier to use.
     *
     * @param value the classifier to use
     */
    public void setClassifier(ClassOption value) {
    	m_Classifier       = value;
    	m_ActualClassifier = (Classifier) MOAUtils.fromOption(m_Classifier);
    }
  
    /**
     * Returns the current MOA classifier in use.
     *
     * @return the classifier in use
     */
    public ClassOption getClassifier() {
    	return m_Classifier;
    }
  
    /**
     * Returns the tooltip displayed in the GUI.
     *
     * @return the tooltip
     */
    public String classifierTipText() {
    	return "The MOA classifier to use.";
    }
  
    /**
     * Returns the Capabilities of this classifier. Maximally permissive
     * capabilities are allowed by default. MOA doesn't specify what
     *
     * @return            the capabilities of this object
     * @see               Capabilities
     */
    public Capabilities getCapabilities() {
      Capabilities result = new Capabilities(this);
  
      // attributes
      result.enable(Capability.NOMINAL_ATTRIBUTES);
      result.enable(Capability.NUMERIC_ATTRIBUTES);
      result.enable(Capability.MISSING_VALUES);
  
      // class
      result.enable(Capability.NOMINAL_CLASS);
      result.enable(Capability.MISSING_CLASS_VALUES);
  
      result.setMinimumNumberInstances(0);
  
      return result;
    }
  
    /**
     * Generates a classifier.
     *
     * @param data set of instances serving as training data
     * @throws Exception if the classifier has not been
     * generated successfully
     */
    public void buildClassifier(Instances data) throws Exception {
  
  
          this.instanceConverter = new WekaToSamoaInstanceConverter();
    	getCapabilities().testWithFail(data);
  
    	data = new Instances(data);
    	data.deleteWithMissingClass();
  
    	m_ActualClassifier.resetLearning();
    	for (int i = 0; i < data.numInstances(); i++)
    		updateClassifier(data.instance(i));
          
    }
  
    /**
     * Updates a classifier using the given instance.
     *
     * @param instance the instance to included
     * @throws Exception if instance could not be incorporated
     * successfully
     */
    public void updateClassifier(Instance instance) throws Exception {
  		m_ActualClassifier.trainOnInstance(instanceConverter.samoaInstance(instance));
    }
  
    /**
     * Predicts the class memberships for a given instance. If
     * an instance is unclassified, the returned array elements
     * must be all zero. If the class is numeric, the array
     * must consist of only one element, which contains the
     * predicted value.
     *
     * @param instance the instance to be classified
     * @return an array containing the estimated membership
     * probabilities of the test instance in each class
     * or the numeric prediction
     * @throws Exception if distribution could not be
     * computed successfully
     */
    public double[] distributionForInstance(Instance instance) throws Exception {
    	double[]	result;
  
    	result = m_ActualClassifier.getVotesForInstance(instanceConverter.samoaInstance(instance));
          // ensure that the array has as many elements as there are
          // class values!
          if (result.length < instance.numClasses()) {
            double[] newResult = new double[instance.numClasses()];
            System.arraycopy(result, 0, newResult, 0, result.length);
            result = newResult;
          }
  
    	try {
    		Utils.normalize(result);
    	}
    	catch (Exception e) {
    		result = new double[instance.numClasses()];
    	}
  
    	return result;
    }
  
    /**
     * Returns the revision string.
     *
     * @return the revision
     */
    public String getRevision() {
      return RevisionUtils.extract("$Revision$");
    }
  
    /**
     * Returns a string representation of the model.
     *
     * @return the string representation
     */
    public String toString() {
    	StringBuilder		result;
  
    	result = new StringBuilder();
    	m_ActualClassifier.getDescription(result, 0);
  
    	return result.toString();
    }
  
    /**
     * Main method for testing this class.
     *
     * @param args the options
     */
    public static void main(String [] args) {
      runClassifier(new MOA(), args);
    }
  }