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