Skip to content

Commit

Permalink
fix SVD tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mdekstrand committed Oct 25, 2024
1 parent de3d70e commit ef8758b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lenskit/tests/algorithms/test_svd.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ def eval(train, test):

folds = xf.partition_users(ml_100k, 5, xf.SampleFrac(0.2))
preds = pd.concat(eval(train, test) for (train, test) in folds)
mae = pm.mae(preds.prediction, preds.rating)
mae = pm.mae(preds)
assert mae == approx(0.74, abs=0.025)

user_rmse = preds.groupby("user").apply(lambda df: pm.rmse(df.prediction, df.rating))
user_rmse = pm.measure_user_predictions(preds, pm.rmse)
assert user_rmse.mean() == approx(0.92, abs=0.05)

0 comments on commit ef8758b

Please sign in to comment.