zqhzy / short_text_cnn_cluster Goto Github PK
View Code? Open in Web Editor NEWImplement of paper Self-Taught Convolutional Neural Networks for Short Text Clustering using Keras.
Implement of paper Self-Taught Convolutional Neural Networks for Short Text Clustering using Keras.
No such file or directory: 'data/GoogleNews-vectors-negative300.bin'
Please let me know whether I am doing any mistake..
I have a model that was output, and I want to classify some short text. Any advice on how to use the pickled model?
Hi,
First of all I want to say thanks to @zqhZY for such a useful code.
I am facing a problem in this code. There is no visualization code as it has been shown in research paper. I want to visualize my results exactly like paper in the form of scatter plot. Therefore, I request to share code of visualization. I would be very thankful to you. I need it within two days as I have to present it in my class. So if visualization code can be shared within two days then it would be very helpful for me. Thank you.
Hi,
First of all, I want to say thanks for this very helpful code. I am a beginner and we are tried to reproduce the results of this experiment. I am trying to running this code on google colab. Due to resources limit I shorten the data set to first 200 rows. I write following lines to run this code files in google colab:
!python3 /content/drive/MyDrive/IRTM_Term_Project_Sem_1/short_text_cnn_cluster-master/utils.py .
!python3 /content/drive/MyDrive/IRTM_Term_Project_Sem_1/short_text_cnn_cluster-master/train_cnn.py .
When I run second command then I am getting these errors. Please help me how can I remove those errors:
/usr/local/lib/python3.6/dist-packages/sklearn/cluster/_kmeans.py:88: RuntimeWarning: divide by zero encountered in log
n_local_trials = 2 + int(np.log(n_clusters))
/usr/local/lib/python3.6/dist-packages/sklearn/cluster/_kmeans.py:88: RuntimeWarning: divide by zero encountered in log
n_local_trials = 2 + int(np.log(n_clusters))
/usr/local/lib/python3.6/dist-packages/sklearn/cluster/_kmeans.py:88: RuntimeWarning: divide by zero encountered in log
n_local_trials = 2 + int(np.log(n_clusters))
joblib.externals.loky.process_executor._RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/joblib/externals/loky/process_executor.py", line 431, in _process_worker
r = call_item()
File "/usr/local/lib/python3.6/dist-packages/joblib/externals/loky/process_executor.py", line 285, in call
return self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.6/dist-packages/joblib/_parallel_backends.py", line 595, in call
return self.func(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/joblib/parallel.py", line 263, in call
for func, args, kwargs in self.items]
File "/usr/local/lib/python3.6/dist-packages/joblib/parallel.py", line 263, in
for func, args, kwargs in self.items]
File "/usr/local/lib/python3.6/dist-packages/sklearn/cluster/_kmeans.py", line 314, in _kmeans_single_elkan
x_squared_norms=x_squared_norms)
File "/usr/local/lib/python3.6/dist-packages/sklearn/cluster/_kmeans.py", line 626, in _init_centroids
x_squared_norms=x_squared_norms)
File "/usr/local/lib/python3.6/dist-packages/sklearn/cluster/_kmeans.py", line 88, in _k_init
n_local_trials = 2 + int(np.log(n_clusters))
OverflowError: cannot convert float infinity to integer
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/content/drive/MyDrive/IRTM_Term_Project_Sem_1/short_text_cnn_cluster-master/train_cnn.py", line 157, in
km.fit(V)
File "/usr/local/lib/python3.6/dist-packages/sklearn/cluster/_kmeans.py", line 956, in fit
for seed in seeds)
File "/usr/local/lib/python3.6/dist-packages/joblib/parallel.py", line 1054, in call
self.retrieve()
File "/usr/local/lib/python3.6/dist-packages/joblib/parallel.py", line 933, in retrieve
self._output.extend(job.get(timeout=self.timeout))
File "/usr/local/lib/python3.6/dist-packages/joblib/_parallel_backends.py", line 542, in wrap_future_result
return future.result(timeout=timeout)
File "/usr/lib/python3.6/concurrent/futures/_base.py", line 432, in result
return self.__get_result()
File "/usr/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result
raise self._exception
OverflowError: cannot convert float infinity to integer
Looking at the code, this seems like it can help me, but there's no way of knowing without spending some effort understanding the code. A bit more detailed summary of the script would be greatly appreciated!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.