List of usage examples for weka.gui.visualize VisualizePanel setYIndex
public void setYIndex(int index) throws Exception
From source file:meka.gui.explorer.classify.IncrementalPerformance.java
License:Open Source License
/** * Creates a panel displaying the data.//from w ww . ja va 2 s.c o m * * @param data the plot data * @return the panel * @throws Exception if plot generation fails */ protected VisualizePanel createPanel(Instances data) throws Exception { VisualizePanel result = new ThresholdVisualizePanel(); PlotData2D plot = new PlotData2D(data); plot.setPlotName("Incremental performance"); plot.m_displayAllPoints = true; boolean[] connectPoints = new boolean[data.numInstances()]; for (int cp = 1; cp < connectPoints.length; cp++) connectPoints[cp] = true; plot.setConnectPoints(connectPoints); result.addPlot(plot); if (data.attribute(SAMPLES) != null) result.setXIndex(data.attribute(SAMPLES).index()); if (data.attribute(ACCURACY) != null) result.setYIndex(data.attribute(ACCURACY).index()); return result; }
From source file:meka.gui.explorer.classify.ShowMacroCurve.java
License:Open Source License
/** * Creates a panel displaying the data.// w w w .j av a2 s.c o m * * @param data the plot data * @return the panel * @throws Exception if plot generation fails */ protected VisualizePanel createPanel(Instances data) throws Exception { VisualizePanel result = new ThresholdVisualizePanel(); PlotData2D plot = new PlotData2D(data); plot.setPlotName("Macro-averaged Performance"); plot.m_displayAllPoints = true; boolean[] connectPoints = new boolean[data.numInstances()]; for (int cp = 1; cp < connectPoints.length; cp++) connectPoints[cp] = true; plot.setConnectPoints(connectPoints); result.addPlot(plot); if (data.attribute(SAMPLES) != null) result.setXIndex(data.attribute(SAMPLES).index()); if (data.attribute(ACCURACY) != null) result.setYIndex(data.attribute(ACCURACY).index()); return result; }
From source file:meka.gui.explorer.classify.ShowMicroCurve.java
License:Open Source License
/** * Creates a panel displaying the data.// w w w . java 2 s. com * * @param data the plot data * @return the panel * @throws Exception if plot generation fails */ protected VisualizePanel createPanel(Instances data) throws Exception { VisualizePanel result = new ThresholdVisualizePanel(); PlotData2D plot = new PlotData2D(data); plot.setPlotName("Micro-averaged Performance"); plot.m_displayAllPoints = true; boolean[] connectPoints = new boolean[data.numInstances()]; for (int cp = 1; cp < connectPoints.length; cp++) connectPoints[cp] = true; plot.setConnectPoints(connectPoints); result.addPlot(plot); if (data.attribute(SAMPLES) != null) result.setXIndex(data.attribute(SAMPLES).index()); if (data.attribute(ACCURACY) != null) result.setYIndex(data.attribute(ACCURACY).index()); return result; }