item_similarity_recommender error

User 2570 | 11/23/2015, 2:34:49 PM

persmodel = graphlab.itemsimilarityrecommender.create(traindata, userid='userid', itemid='song') PROGRESS: Recsys training: model = itemsimilarity PROGRESS: Warning: Ignoring columns songid, listencount, title, artist; PROGRESS: To use one of these as a target column, set target = <column_name> PROGRESS: and use a method that allows the use of a target. PROGRESS: Preparing data set. PROGRESS: Data has 893580 observations with 66085 users and 9952 items. PROGRESS: Data prepared in: 3.99223s

MemoryError Traceback (most recent call last) <ipython-input-26-673d21457636> in <module>() 1 persmodel = graphlab.itemsimilarityrecommender.create(traindata, 2 userid='userid', ----> 3 item_id='song')

C:\Users\mweru\Anaconda2\lib\site-packages\graphlab\toolkits\recommender\itemsimilarityrecommender.pyc in create(observationdata, userid, itemid, target, userdata, itemdata, nearestitems, similaritytype, trainingmethod, threshold, onlytopk, randomseed, verbose) 173 'onlytopk': onlytopk} 174 --> 175 response ='recsystrain', opts, verbose) 176 return ItemSimilarityRecommender(response['model']) 177

C:\Users\mweru\Anaconda2\lib\site-packages\graphlab\toolkits_main.pyc in run(toolkitname, options, verbose, showprogress) 60 try: 61 starttime = time.time() ---> 62 (success, message, params) = unity.runtoolkit(toolkitname, options) 63 endtime = time.time() 64 except:

graphlab\cython\cyunity.pyx in graphlab.cython.cyunity.UnityGlobalProxy.run_toolkit()

graphlab\cython\cyunity.pyx in graphlab.cython.cyunity.UnityGlobalProxy.run_toolkit()

MemoryError: std::bad_alloc


User 19 | 11/23/2015, 6:03:38 PM

Hi erigits,

Sorry to hear you're hitting this error. Can you say how many unique items you have in your training set? train_data['song'].unique().size()

Also, how much RAM do you have on your machine?

If there a large number of unique items, it can require a decent amount of RAM to store the item similarity scores.

Thanks, Chris

User 2570 | 11/25/2015, 8:02:58 AM

Thank you ChrisDuBois