public class EntropyPredictMetric extends AbstractMetric<EntropyPredictMetric.Context,EntropyPredictMetric.EntropyResult,EntropyPredictMetric.EntropyResult>
Modifier and Type | Class and Description |
---|---|
class |
EntropyPredictMetric.Context |
static class |
EntropyPredictMetric.EntropyResult |
Constructor and Description |
---|
EntropyPredictMetric() |
Modifier and Type | Method and Description |
---|---|
EntropyPredictMetric.Context |
createContext(Attributed algorithm,
TTDataSet dataSet,
Recommender rec)
Create the context for an experimental condition (algorithm/data set pair).
|
EntropyPredictMetric.EntropyResult |
doMeasureUser(TestUser user,
EntropyPredictMetric.Context context)
Measure a user with typed results.
|
protected EntropyPredictMetric.EntropyResult |
getTypedResults(EntropyPredictMetric.Context context)
Get the typed results from an accumulator.
|
close, getColumnLabels, getPrefix, getResults, getSuffix, getUserColumnLabels, measureUser
public EntropyPredictMetric.Context createContext(Attributed algorithm, TTDataSet dataSet, Recommender rec)
Metric
algorithm
- The algorithm.dataSet
- The data set.rec
- 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
.public EntropyPredictMetric.EntropyResult doMeasureUser(TestUser user, EntropyPredictMetric.Context context)
AbstractMetric
doMeasureUser
in class AbstractMetric<EntropyPredictMetric.Context,EntropyPredictMetric.EntropyResult,EntropyPredictMetric.EntropyResult>
user
- The user to measure.context
- The context.null
to emit NAs for the user.protected EntropyPredictMetric.EntropyResult getTypedResults(EntropyPredictMetric.Context context)
AbstractMetric
getTypedResults
in class AbstractMetric<EntropyPredictMetric.Context,EntropyPredictMetric.EntropyResult,EntropyPredictMetric.EntropyResult>
context
- The context.null
to emit NAs.