{"action":"created","issue":{"url":"https://api.github.com/repos/lyst/lightfm/issues/87","repository_url":"https://api.github.com/repos/lyst/lightfm","labels_url":"https://api.github.com/repos/lyst/lightfm/issues/87/labels{/name}","comments_url":"https://api.github.com/repos/lyst/lightfm/issues/87/comments","events_url":"https://api.github.com/repos/lyst/lightfm/issues/87/events","html_url":"https://github.com/lyst/lightfm/issues/87","id":156995029,"number":87,"title":"Movielens: getnnz() got an unexpected keyword argument 'axis'","user":{"login":"ricardoatsouza","id":7985816,"avatar_url":"https://avatars.githubusercontent.com/u/7985816?v=3","gravatar_id":"","url":"https://api.github.com/users/ricardoatsouza","html_url":"https://github.com/ricardoatsouza","followers_url":"https://api.github.com/users/ricardoatsouza/followers","following_url":"https://api.github.com/users/ricardoatsouza/following{/other_user}","gists_url":"https://api.github.com/users/ricardoatsouza/gists{/gist_id}","starred_url":"https://api.github.com/users/ricardoatsouza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ricardoatsouza/subscriptions","organizations_url":"https://api.github.com/users/ricardoatsouza/orgs","repos_url":"https://api.github.com/users/ricardoatsouza/repos","events_url":"https://api.github.com/users/ricardoatsouza/events{/privacy}","received_events_url":"https://api.github.com/users/ricardoatsouza/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-05-26T14:20:19Z","updated_at":"2016-05-27T11:28:44Z","closed_at":null,"body":"Hello,\r\nI just started playing around with lightFM, so this can be something that I just missed while trying the Movielens example.\r\n\r\nHere is the code that I did following the tutorial available on this [link](https://github.com/lyst/lightfm/blob/master/examples/movielens/example.ipynb)\r\n`import numpy as np`\r\n`from lightfm.datasets import fetch_movielens # movielens dataset`\r\n`from lightfm.evaluation import * # precision_at_k`\r\n`from lightfm import *`\r\n\r\n`movielens = fetch_movielens()`\r\n\r\n`train = movielens['train']`\r\n`test = movielens['test']`\r\n\r\n`model = LightFM(learning_rate=0.05, loss='bpr')`\r\n\r\n`model.fit(train, epochs=10)`\r\n\r\n`train_precision = precision_at_k(model, train, k=10).mean()`\r\n`test_precision = precision_at_k(model, test, k=10).mean()`\r\n\r\n`train_auc = auc_score(model, train).mean()`\r\n`test_auc = auc_score(model, test).mean()`\r\n\r\n`print('Precision: train %.2f, test %.2f.' % (train_precision, test_precision))`\r\n`print('AUC: train %.2f, test %.2f.' % (train_auc, test_auc))`\r\n\r\n\r\nI'm getting this error as output:\r\n\r\n`Traceback (most recent call last):`\r\n`  File \"main.py\", line 17, in <module>`\r\n`    train_precision = precision_at_k(model, train, k=10).mean()`\r\n`  File \"/Library/Python/2.7/site-packages/lightfm/evaluation.py\", line 70, in precision_at_k`\r\n`    precision = precision[test_interactions.getnnz(axis=1) > 0]`\r\n`TypeError: getnnz() got an unexpected keyword argument 'axis'`\r\n\r\nI'm fairly thinking that it's a silly mistake from my code; but because I couldn't figure it out, I'm opening this issue.\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/lyst/lightfm/issues/comments/222123844","html_url":"https://github.com/lyst/lightfm/issues/87#issuecomment-222123844","issue_url":"https://api.github.com/repos/lyst/lightfm/issues/87","id":222123844,"user":{"login":"ricardoatsouza","id":7985816,"avatar_url":"https://avatars.githubusercontent.com/u/7985816?v=3","gravatar_id":"","url":"https://api.github.com/users/ricardoatsouza","html_url":"https://github.com/ricardoatsouza","followers_url":"https://api.github.com/users/ricardoatsouza/followers","following_url":"https://api.github.com/users/ricardoatsouza/following{/other_user}","gists_url":"https://api.github.com/users/ricardoatsouza/gists{/gist_id}","starred_url":"https://api.github.com/users/ricardoatsouza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ricardoatsouza/subscriptions","organizations_url":"https://api.github.com/users/ricardoatsouza/orgs","repos_url":"https://api.github.com/users/ricardoatsouza/repos","events_url":"https://api.github.com/users/ricardoatsouza/events{/privacy}","received_events_url":"https://api.github.com/users/ricardoatsouza/received_events","type":"User","site_admin":false},"created_at":"2016-05-27T11:28:44Z","updated_at":"2016-05-27T11:28:44Z","body":"I wasn't aware that my SciPy version was too old.\r\nI updated it and, indeed, that was the problem.\r\n\r\nThank you!"}}
{"actor":{"display_login":"ricardoatsouza"}}