Package org.grouplens.lenskit.util.table

Examples of org.grouplens.lenskit.util.table.TableLayoutBuilder.addColumn()


        function = func;
        evalLayout = layout;

        TableLayoutBuilder builder = TableLayoutBuilder.copy(evalLayout.getCommonLayout());
        for (String col: columnHeaders) {
            builder.addColumn(col);
        }
        try {
            writer = CSVWriter.open(outputFile, builder.build());
        } catch (IOException e) {
            throw new RuntimeException("error opening output file", e);
View Full Code Here


        fixedColumns = values.size();

        TableLayoutBuilder bld = new TableLayoutBuilder();
        List<String> bheaders = baseLayout.getColumns();
        for (String h : bheaders.subList(fixedColumns, bheaders.size())) {
            bld.addColumn(h);
        }
        layout = bld.build();
        assert layout.getColumnCount() + rowData.size() == writer.getLayout().getColumnCount();
    }
View Full Code Here

     * @param measurements The measurements.
     * @return An output layout for the suite of experiments.
     */
    public static ExperimentOutputLayout create(ExperimentSuite experiments, MeasurementSuite measurements) {
        TableLayoutBuilder master = new TableLayoutBuilder();
        master.addColumn("Algorithm");
        Map<String,Integer> dataColumns = new HashMap<String, Integer>();
        for (String attr: experiments.getDataAttributes()) {
            dataColumns.put(attr, master.getColumnCount());
            master.addColumn(attr);
        }
View Full Code Here

        TableLayoutBuilder master = new TableLayoutBuilder();
        master.addColumn("Algorithm");
        Map<String,Integer> dataColumns = new HashMap<String, Integer>();
        for (String attr: experiments.getDataAttributes()) {
            dataColumns.put(attr, master.getColumnCount());
            master.addColumn(attr);
        }

        Map<String,Integer> algoColumns = new HashMap<String, Integer>();
        for (String attr: experiments.getAlgorithmAttributes()) {
            algoColumns.put(attr, master.getColumnCount());
View Full Code Here

        }

        Map<String,Integer> algoColumns = new HashMap<String, Integer>();
        for (String attr: experiments.getAlgorithmAttributes()) {
            algoColumns.put(attr, master.getColumnCount());
            master.addColumn(attr);
        }

        TableLayout common = master.build();

        TableLayout results = layoutAggregateOutput(master, measurements);
View Full Code Here

        return new ExperimentOutputLayout(common, dataColumns, algoColumns, results, user);
    }

    private static TableLayout layoutAggregateOutput(TableLayoutBuilder master, MeasurementSuite measurements) {
        TableLayoutBuilder output = master.clone();
        output.addColumn("BuildTime");
        output.addColumn("TestTime");

        for (MetricFactory<?> mf: measurements.getMetricFactories()) {
            List<String> labels = mf.getColumnLabels();
            if (labels != null) {
View Full Code Here

    }

    private static TableLayout layoutAggregateOutput(TableLayoutBuilder master, MeasurementSuite measurements) {
        TableLayoutBuilder output = master.clone();
        output.addColumn("BuildTime");
        output.addColumn("TestTime");

        for (MetricFactory<?> mf: measurements.getMetricFactories()) {
            List<String> labels = mf.getColumnLabels();
            if (labels != null) {
                for (String c: labels) {
View Full Code Here

        for (MetricFactory<?> mf: measurements.getMetricFactories()) {
            List<String> labels = mf.getColumnLabels();
            if (labels != null) {
                for (String c: labels) {
                    output.addColumn(c);
                }
            }
        }

        return output.build();
View Full Code Here

        return output.build();
    }

    private static TableLayout layoutUserTable(TableLayoutBuilder master, MeasurementSuite measurements) {
        TableLayoutBuilder perUser = master.clone();
        perUser.addColumn("User");
        perUser.addColumn("TestTime");
        perUser.addColumn("TrainEvents");
        perUser.addColumn("TestEvents");

        for (MetricFactory<?> mf : measurements.getMetricFactories()) {
View Full Code Here

    }

    private static TableLayout layoutUserTable(TableLayoutBuilder master, MeasurementSuite measurements) {
        TableLayoutBuilder perUser = master.clone();
        perUser.addColumn("User");
        perUser.addColumn("TestTime");
        perUser.addColumn("TrainEvents");
        perUser.addColumn("TestEvents");

        for (MetricFactory<?> mf : measurements.getMetricFactories()) {
            List<String> userColumnLabels = mf.getUserColumnLabels();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.