EvaluationCF.jl
Package for evaluation of predictive algorithms. It contains metrics, data partitioning and more.
Build Status |
---|
Installation
The package can be installed with the Julia package manager.
From the Julia REPL, type ]
to enter the Pkg REPL mode and run:
pkg> add EvaluationCF
Or, equivalently, via the Pkg
API:
julia> import Pkg; Pkg.add("EvaluationCF")
Example
julia> using Persa
julia> using DatasetsCF
julia> using ModelBasedCF
julia> using EvaluationCF
julia> dataset = DatasetsCF.MovieLens()
Collaborative Filtering Dataset
- # users: 943
- # items: 1682
- # ratings: 100000
- Ratings Preference: [1, 2, 3, 4, 5]
julia> sample = EvaluationCF.HoldOut(dataset)
julia> for (ds_train, ds_test) in sample
model = ModelBasedCF.RandomModel(ds_train)
mae = EvaluationCF.mae(model, ds_test)
rmse = EvaluationCF.rmse(model, ds_test)
coverage = EvaluationCF.coverage(model, ds_test)
text =
""" Experiment:
MAE: $(mae)
RMSE: $(rmse)
Coverage: $(coverage)
"""
print(text)
end
Experiment:
MAE: 1.5095490450954905
RMSE: 1.9079140406216837
Coverage: 1.0