ibayer / fastFM

fastFM: A Library for Factorization Machines
http://ibayer.github.io/fastFM
Other
1.08k stars 204 forks source link

Assertion Error #120

Closed sriram-ramanathan closed 6 years ago

sriram-ramanathan commented 6 years ago

I am getting the following error while fitting the model.


AssertionError Traceback (most recent call last)

in () 1 #from fastFM import als 2 fm = sgd.FMClassification(n_iter=1000, init_stdev=0.1, rank=3) ----> 3 fm.fit(X_train,pd.Series(yy).values) /usr/local/lib/python2.7/dist-packages/fastFM/sgd.pyc in fit(self, X, y) 188 X = check_array(X, accept_sparse="csc", dtype=np.float64) 189 --> 190 self.w0_, self.w_, self.V_ = ffm.ffm_sgd_fit(self, X, y) 191 return self fastFM/ffm.pyx in ffm.ffm_sgd_fit (fastFM/ffm.c:4312)() AssertionError:
ibayer commented 6 years ago

You need to make sure that X is a scipy csc_matrix.

ibayer commented 6 years ago

Please reopen is you still have questions.