Java Code Examples for weka.gui.visualize.PlotData2D#setPlotName()
The following examples show how to use
weka.gui.visualize.PlotData2D#setPlotName() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MicroCurve.java From meka with GNU General Public License v3.0 | 6 votes |
/** * Creates a panel displaying the data. * * @param data the plot data * @return the panel * @throws Exception if plot generation fails */ protected static 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; }
Example 2
Source File: ROC.java From meka with GNU General Public License v3.0 | 6 votes |
/** * Creates a panel displaying the data. * * @param data the plot data * @param title the title * @return the panel * @throws Exception if plot generation fails */ protected static ThresholdVisualizePanel createPanel(Instances data, String title) throws Exception { ThresholdVisualizePanel result = new ThresholdVisualizePanel(); PlotData2D plot = new PlotData2D(data); plot.setPlotName(title); 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); result.setROCString("AUC: " + Utils.doubleToString(ThresholdCurve.getROCArea(data), 3)); result.setUpComboBoxes(result.getInstances()); if (data.attribute(ThresholdCurve.FP_RATE_NAME) != null) result.setXIndex(data.attribute(ThresholdCurve.FP_RATE_NAME).index()); if (data.attribute(ThresholdCurve.TP_RATE_NAME) != null) result.setYIndex(data.attribute(ThresholdCurve.TP_RATE_NAME).index()); return result; }
Example 3
Source File: MacroCurve.java From meka with GNU General Public License v3.0 | 6 votes |
/** * Creates a panel displaying the data. * * @param data the plot data * @return the panel * @throws Exception if plot generation fails */ protected static 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; }
Example 4
Source File: PrecisionRecall.java From meka with GNU General Public License v3.0 | 6 votes |
/** * Creates a panel displaying the data. * * @param data the plot data * @param title the title * @return the panel * @throws Exception if plot generation fails */ protected static ThresholdVisualizePanel createPanel(Instances data, String title) throws Exception { ThresholdVisualizePanel result = new ThresholdVisualizePanel(); PlotData2D plot = new PlotData2D(data); plot.setPlotName(title); 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); result.setROCString("PRC area: " + Utils.doubleToString(ThresholdCurve.getPRCArea(data), 3)); result.setUpComboBoxes(result.getInstances()); if (data.attribute(ThresholdCurve.RECALL_NAME) != null) result.setXIndex(data.attribute(ThresholdCurve.RECALL_NAME).index()); if (data.attribute(ThresholdCurve.PRECISION_NAME) != null) result.setYIndex(data.attribute(ThresholdCurve.PRECISION_NAME).index()); return result; }
Example 5
Source File: ShowMacroCurve.java From meka with GNU General Public License v3.0 | 6 votes |
/** * Creates a panel displaying the data. * * @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; }
Example 6
Source File: IncrementalPerformance.java From meka with GNU General Public License v3.0 | 6 votes |
/** * Creates a panel displaying the data. * * @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; }
Example 7
Source File: ShowMicroCurve.java From meka with GNU General Public License v3.0 | 6 votes |
/** * Creates a panel displaying the data. * * @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; }
Example 8
Source File: AbstractShowThresholdCurve.java From meka with GNU General Public License v3.0 | 5 votes |
/** * Creates a panel displaying the ROC data. * * @param data the threshold curve data * @param title the title of the plot * @return the panel * @throws Exception if plot generation fails */ protected ThresholdVisualizePanel createPanel(Instances data, String title) throws Exception { ThresholdVisualizePanel result = new ThresholdVisualizePanel(); PlotData2D plot = new PlotData2D(data); plot.setPlotName(title); 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); setComboBoxIndices(data, result); return result; }