value error in python script

I can reproduce your error with: In [230]: np.concatenate([],0) ————————————————————————— ValueError Traceback (most recent call last) <ipython-input-230-2a097486ce12> in <module>() —-> 1 np.concatenate([],0) ValueError: need at least one array to concatenate In [231]: np.concatenate([np.atleast_2d(i) for i in ()],0) ————————————————————————— ValueError Traceback (most recent call last) <ipython-input-231-007f2dd2af1b> in <module>() —-> 1 np.concatenate([np.atleast_2d(i) for i in ()],0) ValueError: … Read more

python kmeans on string

you will first have to define how you wanna cluster your data. The scikit-learn’s simple KMeans clustering is designed to work on numbers. However scikit-learn can be also be used to cluster documents by topics using a bag-of-words approach. This is done by extracting the features using scipy.sparse matrix instead of standard numpy arrays One … Read more