You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a 2D numpy array 'doc_vecs' of document vectors (axis 0 is a document; axis 1 is the vector representation). When I try to pass this to SphericalKmeans I get the following error:
~/miniconda3/envs/nlp_tm/lib/python3.7/site-packages/coclust/clustering/spherical_kmeans.py in fit(self, X, y)
92 X = transformer.fit_transform(X)
93
---> 94 X = X.todense()
95 X = np.array(X)
96 X = sp.lil_matrix(X)
AttributeError: 'numpy.ndarray' object has no attribute 'todense'
I have a 2D numpy array 'doc_vecs' of document vectors (axis 0 is a document; axis 1 is the vector representation). When I try to pass this to SphericalKmeans I get the following error:
AttributeError Traceback (most recent call last)
.py in
7 start = timeit.default_timer()
8 skm_model = SphericalKmeans(n_clusters=k, weighting=False)
----> 9 skm_model.fit(doc_vecs)
10 skm_labels.append(skm_model.labels_)
11 skm_criterion.append(skm_model.criterion)
~/miniconda3/envs/nlp_tm/lib/python3.7/site-packages/coclust/clustering/spherical_kmeans.py in fit(self, X, y)
92 X = transformer.fit_transform(X)
93
---> 94 X = X.todense()
95 X = np.array(X)
96 X = sp.lil_matrix(X)
AttributeError: 'numpy.ndarray' object has no attribute 'todense'
Relevant versioning info:
MacOS 10.14.6
Anaconda Python 3.7.3
numpy = 1.16.4
scipy = 1.3.1
scikit-learn = 0.21.2
matplotlib = 3.1.1
coclust = 0.2.1
Thanks for your help!
The text was updated successfully, but these errors were encountered: