A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Class for building and using a 0-R classifier. Predicts the mean (for a numeric class) or the mode (for a nominal class). Valid options are: -D If set, classifier is run in debug mode and may output additional info to the console @author Eibe Frank (eibe@cs.waikato.ac.nz) @version $Revision: 5928 $
protected FilteredClassifier getFilteredClassifier() {
FilteredClassifier result;
result = super.getFilteredClassifier();
((NominalToString) result.getFilter()).setAttributeIndexes("1");
result.setClassifier(new ZeroR());
return result;
}
/**
newData.deleteWithMissingClass();
double sum = 0;
double temp_sum = 0;
// Add the model for the mean first
m_zeroR = new ZeroR();
m_zeroR.buildClassifier(newData);
// only class? -> use only ZeroR model
if (newData.numAttributes() == 1) {
System.err.println(
Random random = new Random(m_Seed);
m_zeroR = null;
if (data.numAttributes() == 1) {
m_zeroR = new ZeroR();
m_zeroR.buildClassifier(data);
return;
}
// Randomize and stratify
protected void resetOptions () {
m_trainInstances = null;
m_Evaluation = null;
m_BaseClassifier = new ZeroR();
m_folds = 5;
m_seed = 1;
m_threshold = 0.01;
}