Skip to content
Snippets Groups Projects
Commit 2bdb2631 authored by Muhammad Raufu Miah's avatar Muhammad Raufu Miah
Browse files

Update ExperimentsRandomTestsFixedSystemVarAcceptanceRatioFixedTestSize.java

parent 683e4ffe
Branches
No related tags found
No related merge requests found
......@@ -202,6 +202,8 @@ public class ExperimentsRandomTestsFixedSystemVarAcceptanceRatioFixedTestSize {
XYChart chart5 = QuickChart.getChart("n=100,k=5,Tests=100", "Acceptance Ratio", "Accuracy", seriesNames, xValues, new double[][]{accuracyLstar, accuracyRS, accuracyKV, accuracyOP, accuracyTTT});
new SwingWrapper(chart5).displayChart();
printXYChartPairs(chart5);
}
......@@ -294,6 +296,32 @@ public class ExperimentsRandomTestsFixedSystemVarAcceptanceRatioFixedTestSize {
if((counterexample = controle.findCounterExample(learner.getHypothesisModel(), alphabet)) == null){return 1;}
return 0;
}
public static void printXYChartPairs(XYChart chart) {
System.out.println("Chart: " + chart.getTitle());
// Get all series in the chart
List<XYSeries> seriesList = chart.getSeriesMap().values().stream().collect(Collectors.toList());
// Iterate over each series
for (XYSeries series : seriesList) {
System.out.println("Series: " + series.getName());
// Get x and y data
double[] xData = series.getXData();
double[] yData = series.getYData();
// Ensure x and y data are of the same size
if (xData.length != yData.length) {
System.out.println("Mismatch in data size for series: " + series.getName());
continue;
}
// Print (x, y) pairs
for (int i = 0; i < xData.length; i++) {
System.out.println("(" + xData[i] + ", " + yData[i] + ")");
}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment