当前位置: 首页>>代码示例>>Java>>正文


Java PlotLinesClustered类代码示例

本文整理汇总了Java中de.linearbits.subframe.graph.PlotLinesClustered的典型用法代码示例。如果您正苦于以下问题:Java PlotLinesClustered类的具体用法?Java PlotLinesClustered怎么用?Java PlotLinesClustered使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


PlotLinesClustered类属于de.linearbits.subframe.graph包,在下文中一共展示了PlotLinesClustered类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: analyze

import de.linearbits.subframe.graph.PlotLinesClustered; //导入依赖的package包/类
/**
 * Performs the analysis
 * @param file
 * @param dataset
 * @return
 * @throws ParseException
 */
private static PlotGroup analyze(CSVFile file, BenchmarkDataset dataset) throws ParseException{

    Series3D series = null;
    for (double degree : BenchmarkExperiment4.getGeneralizations()) {
        String generalization = String.valueOf(degree);
        Series3D _series = getSeriesForLinesPlot(file, dataset, generalization);
        if (series == null) {
            series = _series;
        } else {
            series.append(_series);
        }
    }
    
    List<Plot<?>> plots = new ArrayList<Plot<?>>();
    plots.add(new PlotLinesClustered("Dataset: " + dataset.toString(), 
                                     new Labels("Suppression rate", "Information loss"),
                                     series));
    
    GnuPlotParams params = new GnuPlotParams();
    params.rotateXTicks = 0;
    params.keypos = KeyPos.OUTSIDE_TOP;
    params.size = 1.5d;
    return new PlotGroup("Comparison of different version of entropy", plots, params, 1.0d);
}
 
开发者ID:arx-deidentifier,项目名称:risk-benchmark,代码行数:32,代码来源:BenchmarkAnalysis4.java

示例2: analyze

import de.linearbits.subframe.graph.PlotLinesClustered; //导入依赖的package包/类
/**
 * Performs the analysis
 * @param file
 * @param dataset
 * @return
 * @throws ParseException
 */
private static PlotGroup analyze(CSVFile file, BenchmarkDataset dataset, BenchmarkUtilityMeasure measure) throws ParseException{

    Series3D series = getSeriesForLinesPlot(file, dataset, measure);
        
    List<Plot<?>> plots = new ArrayList<Plot<?>>();
    plots.add(new PlotLinesClustered("", 
                                     new Labels("Uniqueness", "Information loss [0-1]"),
                                     series));
    
    GnuPlotParams params = new GnuPlotParams();
    params.rotateXTicks = 0;
    params.keypos = KeyPos.OUTSIDE_TOP;
    params.size = 1.5d;
    params.minY = 0d;
    return new PlotGroup("Comparison of different uniqueness models: " + dataset.toString() + " - " + measure.toString(), plots, params, 1.0d);
}
 
开发者ID:arx-deidentifier,项目名称:risk-benchmark,代码行数:24,代码来源:BenchmarkAnalysis7.java

示例3: analyze

import de.linearbits.subframe.graph.PlotLinesClustered; //导入依赖的package包/类
/**
 * Performs the analysis
 * @param file
 * @param dataset
 * @return
 * @throws ParseException
 */
private static PlotGroup analyze(CSVFile file, BenchmarkDataset dataset, BenchmarkUtilityMeasure measure) throws ParseException{

    Series3D series = getSeriesForLinesPlot(file, dataset, measure);
        
    List<Plot<?>> plots = new ArrayList<Plot<?>>();
    plots.add(new PlotLinesClustered("", 
                                     new Labels("Uniqueness", "Information loss [0-1]"),
                                     series));
    
    GnuPlotParams params = new GnuPlotParams();
    params.rotateXTicks = 0;
    params.keypos = KeyPos.OUTSIDE_TOP;
    params.size = 1.5d;
    params.minY = 0d;
    params.maxY = measure == BenchmarkUtilityMeasure.LOSS ? 0.2d : 0.6d;
    return new PlotGroup("Comparison of different uniqueness models: " + dataset.toString() + " - " + measure.toString(), plots, params, 1.0d);
}
 
开发者ID:arx-deidentifier,项目名称:risk-benchmark,代码行数:25,代码来源:BenchmarkAnalysis3.java

示例4: getGroup1

import de.linearbits.subframe.graph.PlotLinesClustered; //导入依赖的package包/类
/**
 * Returns the first plot group
 * @param file
 * @return
 * @throws ParseException
 */
private static PlotGroup getGroup1(CSVFile file) throws ParseException{

    Series3D series = getSeriesForLinesPlot(file, "JavaQuickSort");
    series.append(getSeriesForLinesPlot(file, "ColtQuickSort"));
    series.append(getSeriesForLinesPlot(file, "ColtMergeSort"));
    
    List<Plot<?>> plots = new ArrayList<Plot<?>>();
    plots.add(new PlotLinesClustered("Sorting Arrays", 
                                     new Labels("Size", "Execution time [ns]"),
                                     series));
    
    GnuPlotParams params = new GnuPlotParams();
    params.rotateXTicks = -90;
    params.keypos = KeyPos.TOP_LEFT;
    params.size = 0.6d;
    return new PlotGroup("Comparison of algorithms", plots, params, 1.0d);
}
 
开发者ID:prasser,项目名称:subframe,代码行数:24,代码来源:SortEvaluation.java

示例5: getGroup1

import de.linearbits.subframe.graph.PlotLinesClustered; //导入依赖的package包/类
/**
 * Build the first plot group
 * @param file
 * @return
 * @throws ParseException
 */
private static PlotGroup getGroup1(CSVFile file) throws ParseException{

    List<Plot<?>> plots = new ArrayList<Plot<?>>();
    
    Series3D series = getSeriesForGroup1(file, "SizeMX");
    plots.add(new PlotLinesClustered("Memory consumption of arrays (MX)", 
                                     new Labels("Array size", "Size [bytes]"),
                                     series));
    series = getSeriesForGroup1(file, "SizeJVM");
    plots.add(new PlotLinesClustered("Memory consumption of arrays (JVM)", 
                                     new Labels("Array size", "Size [bytes]"),
                                     series));
    series = getSeriesForGroup1(file, "SizeInstr");
    plots.add(new PlotLinesClustered("Memory consumption of arrays (Instrumentation)", 
                                     new Labels("Array size", "Size [bytes]"),
                                     series));
         
    GnuPlotParams params = new GnuPlotParams();
    params.rotateXTicks = -90;
    params.keypos = KeyPos.TOP_LEFT;
    params.size = 0.6d;
    params.minY = 0d;
    return new PlotGroup("Memory consumption of arrays", plots, params, 1.0d);
}
 
开发者ID:prasser,项目名称:subframe,代码行数:31,代码来源:BoxingEvaluation.java

示例6: testClusteredLines

import de.linearbits.subframe.graph.PlotLinesClustered; //导入依赖的package包/类
@Test
public void testClusteredLines() {
    
    try {
        CSVFile file = new CSVFile(new File("src/test/test2.csv"));
        
        Selector<String[]> selector = file.getSelectorBuilder()
                                          .field("Run").equals("Test")
                                          .build();
        
        Series3D series = new Series3D(file, selector, 
                                       new Field("Size"),
                                       new Field("Phase"), 
                                       new Field("Execution time", Analyzer.VALUE),
                                       new BufferedArithmeticMeanAnalyzer());
        
        PlotLinesClustered plot = new PlotLinesClustered("Creating, sorting and summing up arrays of different sizes", 
                                                         new Labels("Size", "Execution time [ns]"),
                                                         series);
        
        GnuPlotParams params = new GnuPlotParams();
        params.rotateXTicks = -90;
        params.keypos = KeyPos.TOP_LEFT;
        GnuPlot.plot(plot, params, "src/test/test2_6");
        checkAndDelete("src/test/test2_6.pdf");
        
    } catch (Exception e) {
        fail(e.getMessage());
    }
}
 
开发者ID:prasser,项目名称:subframe,代码行数:31,代码来源:TestEvaluations.java

示例7: getGroup1

import de.linearbits.subframe.graph.PlotLinesClustered; //导入依赖的package包/类
/**
 * Returns the first plot group
 * @param file
 * @return
 * @throws ParseException
 */
private PlotGroup getGroup1(CSVFile file) throws ParseException{

    Selector<String[]> selector = file.getSelectorBuilder()
                                      .field("Run").equals("Test")
                                      .build();
    
    Series3D series = new Series3D(file, selector, 
                                   new Field("Size"),
                                   new Field("Phase"), 
                                   new Field("Execution time", Analyzer.VALUE),
                                   new BufferedArithmeticMeanAnalyzer());

    List<Plot<?>> list = new ArrayList<Plot<?>>();
    list.add(new PlotHistogramClustered("Creating, sorting and summing up arrays of different sizes",
                                         new Labels("Size", "Execution time [ns]"),
                                         series));
    
    list.add(new PlotHistogramStacked("Creating, sorting and summing up arrays of different sizes",
                                       new Labels("Size", "Execution time [ns]"),
                                       series));

    list.add(new PlotLinesClustered("Creating, sorting and summing up arrays of different sizes",
                                     new Labels("Size", "Execution time [ns]"),
                                     series));
    
    GnuPlotParams params = new GnuPlotParams();
    params.rotateXTicks = -90;
    params.keypos = KeyPos.TOP_LEFT;
    params.size = 0.6d;
    return new PlotGroup("Clustered plots", list, params, 0.5d);
}
 
开发者ID:prasser,项目名称:subframe,代码行数:38,代码来源:TestEvaluations.java

示例8: plot

import de.linearbits.subframe.graph.PlotLinesClustered; //导入依赖的package包/类
/**
 * Plots the results from one experiment
 * @param file
 * @param criterion
 * @param measure
 * @param suppression
 * @return
 * @throws ParseException 
 */
private static PlotGroup plot(CSVFile file,
                              BenchmarkPrivacyModel criterion,
                              BenchmarkQualityMeasure measure,
                              double suppression) throws ParseException {

    // Plotting params
    GnuPlotParams params = new GnuPlotParams();
    params.rotateXTicks = 0;
    params.printValues = false;
    params.size = 0.8;
    params.logX = false;
    params.logY = false;
    params.ratio = 0.2d;
    params.minY = 0d;
    params.printValuesFormatString = "%.0f";
    params.maxY = 100d;
    params.keypos = KeyPos.TOP_RIGHT;
    params.colorize = true;

    // Select
    Selector<String[]> selector = file.getSelectorBuilder()
                                      .field("Suppression limit").equals(String.valueOf(suppression)).and()
                                      .field("Quality measure").equals(measure.toString()).and()
                                      .field("Privacy model").equals(criterion.toString())
                                      .build();

    // Create series
    Series3D series = new Series3D(file,
                                   selector,
                                   new Field("Time", Analyzer.VALUE),
                                   new Field("", "Dataset"),
                                   new Field("Quality", Analyzer.VALUE));
    
    // Pre-process
    makeClusterable(series);
    convertUnits(series);

    // Define plot group
    Labels labels = new Labels("Execution time [s]", measure.toString()+" Quality [%]");
    List<Plot<?>> plots = new ArrayList<Plot<?>>();
    plots.add(new PlotLinesClustered("", labels, series));
    String caption = "Development of the quality of the SS13ACS dataset over time for " + criterion.toString()+ " with " + (suppression * 100d) + "\\% suppression (higher is better)";
    return new PlotGroup(caption, plots, params, 1.0d);
}
 
开发者ID:arx-deidentifier,项目名称:highdimensional-benchmark,代码行数:54,代码来源:BenchmarkAnalysis3.java

示例9: getGroup2

import de.linearbits.subframe.graph.PlotLinesClustered; //导入依赖的package包/类
/**
 * Build the second plot group
 * @param file
 * @return
 * @throws ParseException
 */
private static PlotGroup getGroup2(CSVFile file) throws ParseException{

    List<Plot<?>> plots = new ArrayList<Plot<?>>();
    
    Series3D series = getSeriesForGroup2(file, "byte[]");
    plots.add(new PlotLinesClustered("Memory consumption of arrays (byte[])", 
                                     new Labels("Array size", "Size [bytes]"),
                                     series));

    series = getSeriesForGroup2(file, "Byte[]");
    plots.add(new PlotLinesClustered("Memory consumption of arrays (Byte[])", 
                                     new Labels("Array size", "Size [bytes]"),
                                     series));
    
    series = getSeriesForGroup2(file, "int[]");
    plots.add(new PlotLinesClustered("Memory consumption of arrays (int[])", 
                                     new Labels("Array size", "Size [bytes]"),
                                     series));
    
    series = getSeriesForGroup2(file, "Integer[]");
    plots.add(new PlotLinesClustered("Memory consumption of arrays (Integer[])", 
                                     new Labels("Array size", "Size [bytes]"),
                                     series));

    series = getSeriesForGroup2(file, "long[]");
    plots.add(new PlotLinesClustered("Memory consumption of arrays (long[])", 
                                     new Labels("Array size", "Size [bytes]"),
                                     series));
    
    series = getSeriesForGroup2(file, "Long[]");
    plots.add(new PlotLinesClustered("Memory consumption of arrays (Long[])", 
                                     new Labels("Array size", "Size [bytes]"),
                                     series));
    
    GnuPlotParams params = new GnuPlotParams();
    params.rotateXTicks = -90;
    params.keypos = KeyPos.TOP_LEFT;
    params.size = 0.6d;
    params.minY = 0d;
    return new PlotGroup("Memory consumption of arrays", plots, params, .5d);
}
 
开发者ID:prasser,项目名称:subframe,代码行数:48,代码来源:BoxingEvaluation.java

示例10: GnuPlotLinesClustered

import de.linearbits.subframe.graph.PlotLinesClustered; //导入依赖的package包/类
/**
 * Creates a new plot
 * 
 * @param plot
 * @param params
 */
protected GnuPlotLinesClustered(PlotLinesClustered plot, GnuPlotParams params) {
    super(plot, params);
}
 
开发者ID:prasser,项目名称:subframe,代码行数:10,代码来源:GnuPlotLinesClustered.java


注:本文中的de.linearbits.subframe.graph.PlotLinesClustered类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。