safreita1 / Recommender-System

Anime recommender system using collaborative filtering and latent factor model

Home Page:https://www.scottfreitas.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: 'numpy.float64' object cannot be interpreted as an index

flolep2607 opened this issue · comments

`Welcome to the Anime Recommender System.
If this is your first time running the program? You'll need to create the necessary matrices andremapped rating file if it is.
Create matrices and remapped rating file if they don't already exist? (yes or no) yes
Initializing Data Preprocessing
Loading remapped data
Remapped data loaded in 20.1149749756 seconds
Data Preprocessing initialization done in 20.1162760258 seconds
Running random split
Building Sparse Matrices
Traceback (most recent call last):
File "RecommenderSystem.py", line 18, in
preprocess.run_random_split()
File "/mnt/c/Users/flole/Desktop/tst/tst42recommend/DataPreprocessing.py", line 207, in run_random_split
test_file_name=self.random_testing_filepath)
File "/mnt/c/Users/flole/Desktop/tst/tst42recommend/DataPreprocessing.py", line 115, in random_split
shape=(sparse_movie_size, sparse_user_size), dtype=np.float64)
File "/usr/local/lib/python2.7/dist-packages/scipy/sparse/coo.py", line 154, in init
self._shape = check_shape((M, N))
File "/usr/local/lib/python2.7/dist-packages/scipy/sparse/sputils.py", line 286, in check_shape
new_shape = tuple(operator.index(arg) for arg in args)
File "/usr/local/lib/python2.7/dist-packages/scipy/sparse/sputils.py", line 286, in
new_shape = tuple(operator.index(arg) for arg in args)

TypeError: 'numpy.float64' object cannot be interpreted as an index`
image