https://github.com/jmrozanec/capsnet-text-classification
Provides a capsnet implementation for text classification
https://github.com/jmrozanec/capsnet-text-classification
Last synced: 5 months ago
JSON representation
Provides a capsnet implementation for text classification
- Host: GitHub
- URL: https://github.com/jmrozanec/capsnet-text-classification
- Owner: jmrozanec
- License: apache-2.0
- Created: 2019-01-04T15:12:34.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-16T11:53:05.000Z (about 7 years ago)
- Last Synced: 2024-12-27T15:11:11.383Z (over 1 year ago)
- Language: Jupyter Notebook
- Size: 27.5 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# capsnet-text-classification
Provides a capsnet implementation for text classification
We provide the following notebooks:
- dataset-to-embeddings.ipynb: to transform headlines to embedding vectors used as new dataset to perform classification
- dataset-analysis.ipynb: to obtain general information regarding the dataset: most frequent terms, which cannot be represented as embeddings, most frequent words particular to a specific topic, etc.
- XGBoost.ipynb: classification performed with XGBoost
- ConvRec.ipynb: ConvRec implementation and dataset classification
- CapsNet.ipynb: CapsNet implementation and dataset classification
Results we obtained:
|Metric|CapsNet|XGBoost|ConvRec|
|------|-------|-------|-------|
|Accuracy|0.8901|0.8179|0.8897|
|Time trained|920 minutes|23 minutes|189 minutes|
To start a Docker image, run:
- docker run -p 8888:8888 -v "$PWD":/home/jovyan jupyter/datascience-notebook
- docker exec b7f3abbf54da pip install keras