Package org.grouplens.lenskit.util.table.writer

Examples of org.grouplens.lenskit.util.table.writer.TableWriter.writeRow()


    public Void createContext(Attributed algorithm, TTDataSet dataSet, Recommender recommender) {
        Preconditions.checkState(evalLayout != null, "evaluation not in progress");
        TableWriter w = evalLayout.prefixTable(writer, algorithm, dataSet);
        for (List<Object> row: function.apply(recommender)) {
            try {
                w.writeRow(row.toArray());
            } catch (IOException e) {
                throw new RuntimeException("error writing row", e);
            }
        }
        return null;
View Full Code Here


                        row[0] = r.getUserId();
                        row[1] = r.getItemId();
                        if (writeRatings) {
                            row[2] = p.getValue();
                        }
                        table.writeRow(row);
                    }
                }
            } finally {
                ratings.close();
            }
View Full Code Here

                }
                userTimer.stop();
                userRow.set(1, userTimer.elapsed(TimeUnit.MILLISECONDS) * 0.001);
                if (userResults != null) {
                    try {
                        userResults.writeRow(userRow);
                    } catch (IOException e) {
                        throw new RuntimeException("error writing user row", e);
                    }
                }
                userRow.clear();
View Full Code Here

        row.add(test.getTime());
        row.addAll(measures);
        for (MetricWithAccumulator<?> acc : accums) {
            row.addAll(acc.getResults());
        }
        results.writeRow(row);
    }

    @Override
    public String toString() {
        return String.format("test %s on %s", algorithmInfo, dataSet);
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.