evaluate {recommenderlab}R Documentation

Evaluate a Recommender Models

Description

Evaluates a single or a list of recommender model given an evaluation scheme.

Usage

evaluate(x, method, ...)
## S4 method for signature 'evaluationScheme, character':
evaluate(x, method, n=1:10, 
parameter=NULL, progress = TRUE, keepModel=FALSE)
## S4 method for signature 'evaluationScheme, list':
evaluate(x, method, n=1:10, 
parameter=NULL, progress = TRUE, keepModel=FALSE)

Arguments

x an evaluation scheme (class "evaluationScheme").
method a character string or a list. If a single character string is given it defines the recommender method used for evaluation. If several recommender methods need to be compared, method contains a nested list. Each element describes a recommender method and consists of a list with two elements: a character string named "method" containing the method and a list names "parameters" containing the parameters used for this recommender method. See Recommender for available methods.
n N (number of recommendations) of the top-N lists generated.
parameter parameters for the recommender algorithm.
progress report progress?
keepModel store used recommender models?
... further arguments.

Value

Returns an object of class "evaluationResults" or if method is a list an object of class "evaluationResultList".

See Also

evaluationScheme, evaluationResults. evaluationResultList.

Examples

data("MSWeb")
MSWeb10 <- sample(MSWeb[rowCounts(MSWeb) >10,], 100)

## create an evaluation scheme
es <- evaluationScheme(MSWeb10, method="cross-validation",
        k=4, given=3)

## run evaluation
ev <- evaluate(es, "POPULAR")
ev

## look at the results
avg(ev)
plot(ev, type="o", annotate = TRUE)

## now run evaluate with a list
algorithms <- list(
                RANDOM = list(name = "RANDOM", param = NULL),
                POPULAR = list(name = "POPULAR", param = NULL),
                UBCF = list(name = "UBCF", param = NULL),
                IBCF = list(name = "IBCF", param=NULL),
                AR = list(name = "AR", param=NULL)
                )

evlist <- evaluate(es, algorithms)
plot(evlist, legend="topright")

## select the first results
evlist[[1]]

[Package recommenderlab version 0.1-0 Index]