public final class GenericRecommenderIRStatsEvaluator extends Object implements RecommenderIRStatsEvaluator
For each user, these implementation determine the top n
preferences, then evaluate the IR
statistics based on a DataModel
that does not have these values. This number n
is the
"at" value, as in "precision at 5". For example, this would mean precision evaluated by removing the top 5
preferences for a user and then finding the percentage of those 5 items included in the top 5
recommendations for that user.
Modifier and Type | Field and Description |
---|---|
static double |
CHOOSE_THRESHOLD
Pass as "relevanceThreshold" argument to
evaluate(RecommenderBuilder, DataModelBuilder, DataModel, IDRescorer, int, double, double) to
have it attempt to compute a reasonable threshold. |
Constructor and Description |
---|
GenericRecommenderIRStatsEvaluator() |
GenericRecommenderIRStatsEvaluator(RelevantItemsDataSplitter dataSplitter) |
Modifier and Type | Method and Description |
---|---|
IRStatistics |
evaluate(RecommenderBuilder recommenderBuilder,
DataModelBuilder dataModelBuilder,
DataModel dataModel,
IDRescorer rescorer,
int at,
double relevanceThreshold,
double evaluationPercentage) |
public static final double CHOOSE_THRESHOLD
evaluate(RecommenderBuilder, DataModelBuilder, DataModel, IDRescorer, int, double, double)
to
have it attempt to compute a reasonable threshold. Note that this will impact performance.public GenericRecommenderIRStatsEvaluator()
public GenericRecommenderIRStatsEvaluator(RelevantItemsDataSplitter dataSplitter)
public IRStatistics evaluate(RecommenderBuilder recommenderBuilder, DataModelBuilder dataModelBuilder, DataModel dataModel, IDRescorer rescorer, int at, double relevanceThreshold, double evaluationPercentage) throws TasteException
evaluate
in interface RecommenderIRStatsEvaluator
recommenderBuilder
- object that can build a Recommender
to testdataModelBuilder
- DataModelBuilder
to use, or if null, a default DataModel
implementation will be
useddataModel
- dataset to test onrescorer
- if any, to use when computing recommendationsat
- as in, "precision at 5". The number of recommendations to consider when evaluating precision,
etc.relevanceThreshold
- items whose preference value is at least this value are considered "relevant" for the purposes
of computationsIRStatistics
with resulting precision, recall, etc.TasteException
- if an error occurs while accessing the DataModel
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.