/** * Tests the CostCurve generation from the command line. The classifier is * currently hardcoded. Pipe in an arff file. * * @param args currently ignored */ public static void main(String[] args) { try { Instances inst = new Instances(new java.io.InputStreamReader(System.in)); inst.setClassIndex(inst.numAttributes() - 1); CostCurve cc = new CostCurve(); EvaluationUtils eu = new EvaluationUtils(); Classifier classifier = new weka.classifiers.functions.Logistic(); ArrayList<Prediction> predictions = new ArrayList<Prediction>(); for (int i = 0; i < 2; i++) { // Do two runs. eu.setSeed(i); predictions.addAll(eu.getCVPredictions(classifier, inst, 10)); // System.out.println("\n\n\n"); } Instances result = cc.getCurve(predictions); System.out.println(result); } catch (Exception ex) { ex.printStackTrace(); } } }
inst.setClassIndex(inst.numAttributes() - 1); ThresholdCurve tc = new ThresholdCurve(); EvaluationUtils eu = new EvaluationUtils(); Classifier classifier = new weka.classifiers.functions.Logistic(); ArrayList<Prediction> predictions = new ArrayList<Prediction>();
inst.setClassIndex(inst.numAttributes() - 1); ThresholdCurve tc = new ThresholdCurve(); EvaluationUtils eu = new EvaluationUtils(); Classifier classifier = new weka.classifiers.functions.Logistic(); ArrayList<Prediction> predictions = new ArrayList<Prediction>();
/** * Tests the CostCurve generation from the command line. The classifier is * currently hardcoded. Pipe in an arff file. * * @param args currently ignored */ public static void main(String[] args) { try { Instances inst = new Instances(new java.io.InputStreamReader(System.in)); inst.setClassIndex(inst.numAttributes() - 1); CostCurve cc = new CostCurve(); EvaluationUtils eu = new EvaluationUtils(); Classifier classifier = new weka.classifiers.functions.Logistic(); ArrayList<Prediction> predictions = new ArrayList<Prediction>(); for (int i = 0; i < 2; i++) { // Do two runs. eu.setSeed(i); predictions.addAll(eu.getCVPredictions(classifier, inst, 10)); // System.out.println("\n\n\n"); } Instances result = cc.getCurve(predictions); System.out.println(result); } catch (Exception ex) { ex.printStackTrace(); } } }
train.setClassIndex(train.numAttributes() - 1); weka.classifiers.evaluation.ThresholdCurve tc = new weka.classifiers.evaluation.ThresholdCurve(); weka.classifiers.evaluation.EvaluationUtils eu = new weka.classifiers.evaluation.EvaluationUtils();
train.setClassIndex(train.numAttributes() - 1); weka.classifiers.evaluation.ThresholdCurve tc = new weka.classifiers.evaluation.ThresholdCurve(); weka.classifiers.evaluation.EvaluationUtils eu = new weka.classifiers.evaluation.EvaluationUtils();
/** * Tests the MarginCurve generation from the command line. The classifier is * currently hardcoded. Pipe in an arff file. * * @param args currently ignored */ public static void main(String[] args) { try { Utils.SMALL = 0; Instances inst = new Instances(new java.io.InputStreamReader(System.in)); inst.setClassIndex(inst.numAttributes() - 1); MarginCurve tc = new MarginCurve(); EvaluationUtils eu = new EvaluationUtils(); weka.classifiers.meta.LogitBoost classifier = new weka.classifiers.meta.LogitBoost(); classifier.setNumIterations(20); ArrayList<Prediction> predictions = eu.getTrainTestPredictions( classifier, inst, inst); Instances result = tc.getCurve(predictions); System.out.println(result); } catch (Exception ex) { ex.printStackTrace(); } } }
/** * Tests the MarginCurve generation from the command line. The classifier is * currently hardcoded. Pipe in an arff file. * * @param args currently ignored */ public static void main(String[] args) { try { Utils.SMALL = 0; Instances inst = new Instances(new java.io.InputStreamReader(System.in)); inst.setClassIndex(inst.numAttributes() - 1); MarginCurve tc = new MarginCurve(); EvaluationUtils eu = new EvaluationUtils(); weka.classifiers.meta.LogitBoost classifier = new weka.classifiers.meta.LogitBoost(); classifier.setNumIterations(20); ArrayList<Prediction> predictions = eu.getTrainTestPredictions( classifier, inst, inst); Instances result = tc.getCurve(predictions); System.out.println(result); } catch (Exception ex) { ex.printStackTrace(); } } }
final EvaluationUtils eu = new EvaluationUtils(); predictions = eu.getTestPredictions(classifier, data); } catch (Exception e) {
final EvaluationUtils eu = new EvaluationUtils(); predictions = eu.getTestPredictions(classifier, data); } catch (Exception e) {
EvaluationUtils eu = new EvaluationUtils(); ArrayList<Prediction> predictions = new ArrayList<Prediction>(); for (int i = 0; i < runs; i++) {
EvaluationUtils eu = new EvaluationUtils(); ArrayList<Prediction> predictions = new ArrayList<Prediction>(); for (int i = 0; i < runs; i++) {
classifier = getClassifier(m_modelNames.get(i)); testData = getData(m_dataSetNames.get(i)); evalUtils = new EvaluationUtils();
Instances train = null; Instances test = null; EvaluationUtils evaluation = new EvaluationUtils();
classifier = getClassifier(m_modelNames.get(i)); testData = getData(m_dataSetNames.get(i)); evalUtils = new EvaluationUtils();
Instances train = null; Instances test = null; EvaluationUtils evaluation = new EvaluationUtils();
evaluation = new EvaluationUtils(); try { trainAndSerializeClassifier(train);
evaluation = new EvaluationUtils(); try { trainAndSerializeClassifier(train);