Modifier and Type | Class and Description |
---|---|
static class |
FunctionMultiModelMetric.Factory |
Constructor and Description |
---|
FunctionMultiModelMetric(java.io.File file,
java.util.List<java.lang.String> columns,
Function<Recommender,java.util.List<java.util.List<java.lang.Object>>> func,
org.grouplens.lenskit.eval.traintest.ExperimentOutputLayout layout) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
java.lang.Void |
createContext(Attributed algorithm,
TTDataSet dataSet,
Recommender recommender)
Create the context for an experimental condition (algorithm/data set pair).
|
java.util.List<java.lang.String> |
getColumnLabels()
Get labels for the aggregate columns output by this evaluator.
|
java.util.List<java.lang.Object> |
getResults(java.lang.Void context)
Get the aggregate results from an accumulator.
|
java.util.List<java.lang.String> |
getUserColumnLabels()
Get labels for the per-user columns output by this evaluator.
|
java.util.List<java.lang.Object> |
measureUser(TestUser user,
java.lang.Void context)
Measure a user in the evaluation.
|
public FunctionMultiModelMetric(java.io.File file, java.util.List<java.lang.String> columns, Function<Recommender,java.util.List<java.util.List<java.lang.Object>>> func, org.grouplens.lenskit.eval.traintest.ExperimentOutputLayout layout)
public java.util.List<java.lang.String> getColumnLabels()
Metric
getColumnLabels
in interface Metric<java.lang.Void>
public java.util.List<java.lang.String> getUserColumnLabels()
Metric
getUserColumnLabels
in interface Metric<java.lang.Void>
Metric.measureUser(TestUser, Object)
@Nullable public java.lang.Void createContext(Attributed algorithm, TTDataSet dataSet, Recommender recommender)
Metric
createContext
in interface Metric<java.lang.Void>
algorithm
- The algorithm.dataSet
- The data set.recommender
- The LensKit recommender, if applicable. This can be null for an external
algorithm that does not provide a LensKit recommender.Metric.measureUser(TestUser, Object)
. If
the metric does not accumulate any results, this method can return null
.@Nonnull public java.util.List<java.lang.Object> measureUser(TestUser user, java.lang.Void context)
Metric
measureUser
in interface Metric<java.lang.Void>
user
- The user to evaluate.context
- The context for the active experimental condition.@Nonnull public java.util.List<java.lang.Object> getResults(java.lang.Void context)
Metric
getResults
in interface Metric<java.lang.Void>
context
- The context for an experimental condition.public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException