This notebook analyzes the results of the evaluation quickstart.
First, we need to import our libraries:
import pandas as pd
import matplotlib
%matplotlib inline
LensKit puts its output in a csv
file:
results = pd.read_csv('build/eval-results.csv')
results.head()
We ran each algorithm 5 times since we used 5-fold cross-validation. What we want to do next is compute the average value of each metric for each data set.
agg_results = results.drop(['Partition'], axis=1).groupby('Algorithm').mean()
agg_results
Let's start plotting things. What's the RMSE achieved by each algorithm?
results.loc[:,['Algorithm', 'RMSE.ByUser']].boxplot(by='Algorithm')
Next up: nDCG
results.loc[:,['Algorithm', 'nDCG']].boxplot(by='Algorithm')
Finally, the build and test times.
results.loc[:,['Algorithm', 'BuildTime', 'TestTime']].boxplot(by='Algorithm')