public AggregateableFilteredClassifierUpdateable() { m_Classifier = new NaiveBayesUpdateable(); }
/** * Construct a new NBNode * * @param header the instances structure of the data we're learning from * @param nbWeightThreshold the weight mass to see before allowing naive Bayes * to predict * @throws Exception if a problem occurs */ public NBNode(Instances header, double nbWeightThreshold) throws Exception { m_nbWeightThreshold = nbWeightThreshold; m_bayes = new NaiveBayesUpdateable(); m_bayes.buildClassifier(header); }
/** * Default constructor. */ public FilteredClassifierUpdateable() { super(); m_Classifier = new weka.classifiers.bayes.NaiveBayesUpdateable(); m_Filter = new weka.filters.AllFilter(); }
/** * Main method for testing this class. * * @param argv the options */ public static void main(String [] argv) { runClassifier(new NaiveBayesUpdateable(), argv); } }
/** * Main method for testing this class. * * @param argv the options */ public static void main(String [] argv) { runClassifier(new NaiveBayesUpdateable(), argv); } }
/** Creates a default NaiveBayesUpdateable */ public Classifier getClassifier() { return new NaiveBayesUpdateable(); }
/** * Construct a new NBNode * * @param header the instances structure of the data we're learning from * @param nbWeightThreshold the weight mass to see before allowing naive Bayes * to predict * @throws Exception if a problem occurs */ public NBNode(Instances header, double nbWeightThreshold) throws Exception { m_nbWeightThreshold = nbWeightThreshold; m_bayes = new NaiveBayesUpdateable(); m_bayes.buildClassifier(header); }
/** Creates a default NaiveBayesUpdateable */ public Classifier getClassifier() { return new NaiveBayesUpdateable(); }
protected WekaClassifierMapTask setupIncrementalClassifier() { WekaClassifierMapTask task = new WekaClassifierMapTask(); task.setClassifier(new weka.classifiers.bayes.NaiveBayesUpdateable()); return task; }
/** * Build the no-split node * * @param instances an <code>Instances</code> value * @exception Exception if an error occurs */ public final void buildClassifier(Instances instances) throws Exception { m_nb = new NaiveBayesUpdateable(); m_disc = new Discretize(); m_disc.setInputFormat(instances); Instances temp = Filter.useFilter(instances, m_disc); m_nb.buildClassifier(temp); if (temp.numInstances() >= 5) { m_errors = crossValidate(m_nb, temp, new Random(1)); } m_numSubsets = 1; }
/** * Build the no-split node * * @param instances an <code>Instances</code> value * @exception Exception if an error occurs */ public final void buildClassifier(Instances instances) throws Exception { m_nb = new NaiveBayesUpdateable(); m_disc = new Discretize(); m_disc.setInputFormat(instances); Instances temp = Filter.useFilter(instances, m_disc); m_nb.buildClassifier(temp); if (temp.numInstances() >= 5) { m_errors = crossValidate(m_nb, temp, new Random(1)); } m_numSubsets = 1; }
task.setClassifier(new weka.classifiers.bayes.NaiveBayesUpdateable()); task.setup(new Instances(train, 0)); for (int i = 0; i < train.numInstances(); i++) {
NaiveBayesUpdateable fullModel = new NaiveBayesUpdateable(); fullModel.buildClassifier(trainingSets[i]);
NaiveBayesUpdateable fullModel = new NaiveBayesUpdateable(); fullModel.buildClassifier(trainingSets[i]);
trainer.setClassifier(new weka.classifiers.bayes.NaiveBayesUpdateable()); trainer.setTotalNumFolds(10);
trainer.setClassifier(new weka.classifiers.bayes.NaiveBayesUpdateable()); trainer.setTotalNumFolds(10);
NaiveBayesUpdateable fullModel = new NaiveBayesUpdateable(); fullModel.buildClassifier(trainingSets[i]);
NaiveBayesUpdateable fullModel = new NaiveBayesUpdateable(); fullModel.buildClassifier(trainingSets[i]);