/** * Generate a bunch of predictions ready for processing, by performing a * evaluation on a test set after training on the given training set. * * @param classifier the Classifier to evaluate * @param train the training dataset * @param test the test dataset * @exception Exception if an error occurs */ public ArrayList<Prediction> getTrainTestPredictions(Classifier classifier, Instances train, Instances test) throws Exception { classifier.buildClassifier(train); return getTestPredictions(classifier, test); }
/** * Generate a bunch of predictions ready for processing, by performing a * evaluation on a test set after training on the given training set. * * @param classifier the Classifier to evaluate * @param train the training dataset * @param test the test dataset * @exception Exception if an error occurs */ public ArrayList<Prediction> getTrainTestPredictions(Classifier classifier, Instances train, Instances test) throws Exception { classifier.buildClassifier(train); return getTestPredictions(classifier, test); }
try { final EvaluationUtils eu = new EvaluationUtils(); predictions = eu.getTestPredictions(classifier, data); } catch (Exception e) { IJ.log("Error while evaluating data!");
try { final EvaluationUtils eu = new EvaluationUtils(); predictions = eu.getTestPredictions(classifier, data); } catch (Exception e) { IJ.log("Error while evaluating data!");
Attribute classAtt = testData.attribute(className); testData.setClass(classAtt); predictions = evalUtils.getTestPredictions(classifier, testData); success = true; String predsString = weka.classifiers.AbstractClassifierTest
Attribute classAtt = testData.attribute(className); testData.setClass(classAtt); predictions = evalUtils.getTestPredictions(classifier, testData); success = true; String predsString = weka.classifiers.AbstractClassifierTest