public double getF1 (Labeling label) { return getF1 (label.getBestIndex()); }
public double getF1 (Labeling label) { return getF1 (label.getBestIndex()); }
public double getF1 (Labeling label) { return getF1 (label.getBestIndex()); }
public double getF1 (InstanceList ilist, int index) { return new Trial(this, ilist).getF1(index); } public double getF1 (InstanceList ilist, Labeling labeling) { return new Trial(this, ilist).getF1(labeling); }
public double getF1 (InstanceList ilist, int index) { return new Trial(this, ilist).getF1(index); } public double getF1 (InstanceList ilist, Labeling labeling) { return new Trial(this, ilist).getF1(labeling); }
public double getF1 (InstanceList ilist, Object labelEntry) { return new Trial(this, ilist).getF1(labelEntry); } public double getAverageRank (InstanceList ilist) { return new Trial(this, ilist).getAverageRank(); }
public double getF1 (InstanceList ilist, Labeling labeling) { return new Trial(this, ilist).getF1(labeling); } public double getF1 (InstanceList ilist, Object labelEntry) { return new Trial(this, ilist).getF1(labelEntry); }
public double getF1 (InstanceList ilist, Object labelEntry) { return new Trial(this, ilist).getF1(labelEntry); } public double getAverageRank (InstanceList ilist) { return new Trial(this, ilist).getAverageRank(); }
public double getF1 (InstanceList ilist, Labeling labeling) { return new Trial(this, ilist).getF1(labeling); } public double getF1 (InstanceList ilist, Object labelEntry) { return new Trial(this, ilist).getF1(labelEntry); }
public double getF1 (InstanceList ilist, Object labelEntry) { return new Trial(this, ilist).getF1(labelEntry); } public double getAverageRank (InstanceList ilist) { return new Trial(this, ilist).getAverageRank(); }
public double getF1 (InstanceList ilist, Labeling labeling) { return new Trial(this, ilist).getF1(labeling); } public double getF1 (InstanceList ilist, Object labelEntry) { return new Trial(this, ilist).getF1(labelEntry); }
public double getF1 (InstanceList ilist, int index) { return new Trial(this, ilist).getF1(index); } public double getF1 (InstanceList ilist, Labeling labeling) { return new Trial(this, ilist).getF1(labeling); }
/** Calculate the F1-measure of the classifier on an instance list for a particular target entry */ public double getF1 (Object labelEntry) { int index; if (labelEntry instanceof Labeling) index = ((Labeling)labelEntry).getBestIndex(); else index = classifier.getLabelAlphabet().lookupIndex(labelEntry, false); if (index == -1) throw new IllegalArgumentException ("Label "+labelEntry.toString()+" is not a valid label."); return getF1 (index); }
/** Calculate the F1-measure of the classifier on an instance list for a particular target entry */ public double getF1 (Object labelEntry) { int index; if (labelEntry instanceof Labeling) index = ((Labeling)labelEntry).getBestIndex(); else index = classifier.getLabelAlphabet().lookupIndex(labelEntry, false); if (index == -1) throw new IllegalArgumentException ("Label "+labelEntry.toString()+" is not a valid label."); return getF1 (index); }
private List<String> createRow( InstanceList training, InstanceList testing, String e, Classifier classifier, Trial trial) { List<String> row = new ArrayList<>(); row.add(e); row.add(Integer.toString(training.size())); row.add(Integer.toString(testing.size())); row.add(Double.toString(trial.getAccuracy())); for (String label : (String[]) classifier.getLabelAlphabet().toArray(new String[0])) { row.add(Double.toString(trial.getF1(label))); row.add(Double.toString(trial.getPrecision(label))); row.add(Double.toString(trial.getRecall(label))); } return row; }
private List<String> createRow( InstanceList training, InstanceList testing, String e, Classifier classifier, Trial trial) { List<String> row = new ArrayList<>(); row.add(e); row.add(Integer.toString(training.size())); row.add(Integer.toString(testing.size())); row.add(Double.toString(trial.getAccuracy())); for (String label : (String[]) classifier.getLabelAlphabet().toArray(new String[0])) { row.add(Double.toString(trial.getF1(label))); row.add(Double.toString(trial.getPrecision(label))); row.add(Double.toString(trial.getRecall(label))); } return row; }
/** Calculate the F1-measure of the classifier on an instance list for a particular target entry */ public double getF1 (Object labelEntry) { int index; if (labelEntry instanceof Labeling) index = ((Labeling)labelEntry).getBestIndex(); else index = classifier.getLabelAlphabet().lookupIndex(labelEntry, false); if (index == -1) throw new IllegalArgumentException ("Label "+labelEntry.toString()+" is not a valid label."); return getF1 (index); }
private void logAccuracyMetrics(Classifier classifier, Trial trial) { getMonitor().info("Accuracy: {}", trial.getAccuracy()); for (String label : (String[]) classifier.getLabelAlphabet().toArray(new String[0])) { getMonitor().info("F1 for class '{}': {}", label, trial.getF1(label)); getMonitor().info("Precision for class '{}' : {}", label, trial.getPrecision(label)); } }
private void logAccuracyMetrics(Classifier classifier, Trial trial) { getMonitor().info("Accuracy: {}", trial.getAccuracy()); for (String label : (String[]) classifier.getLabelAlphabet().toArray(new String[0])) { getMonitor().info("F1 for class '{}': {}", label, trial.getF1(label)); getMonitor().info("Precision for class '{}' : {}", label, trial.getPrecision(label)); } }