https://github.com/jiegzhan/multi-class-text-classification-cnn-rnn
Classify Kaggle San Francisco Crime Description into 39 classes. Build the model with CNN, RNN (GRU and LSTM) and Word Embeddings on Tensorflow.
https://github.com/jiegzhan/multi-class-text-classification-cnn-rnn
cnn embeddings kaggle lstm rnn tensorflow text-classification
Last synced: about 2 months ago
JSON representation
Classify Kaggle San Francisco Crime Description into 39 classes. Build the model with CNN, RNN (GRU and LSTM) and Word Embeddings on Tensorflow.
- Host: GitHub
- URL: https://github.com/jiegzhan/multi-class-text-classification-cnn-rnn
- Owner: jiegzhan
- License: apache-2.0
- Created: 2016-10-28T16:55:06.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-03-23T17:46:57.000Z (over 8 years ago)
- Last Synced: 2024-04-15T23:01:01.883Z (about 2 years ago)
- Topics: cnn, embeddings, kaggle, lstm, rnn, tensorflow, text-classification
- Language: Python
- Homepage: https://www.kaggle.com/c/sf-crime/data
- Size: 88.6 MB
- Stars: 592
- Watchers: 53
- Forks: 263
- Open Issues: 29
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-github-projects - multi-class-text-classification-cnn-rnn - Classify Kaggle San Francisco Crime Description into 39 classes. Build the model with CNN, RNN (GRU and LSTM) and Word Embeddings on Tensorflow. ⭐602 `Python` 🔥 (🤖 AI & Machine Learning)
README
### Project: Classify Kaggle San Francisco Crime Description
### Highlights:
- This is a **multi-class text classification (sentence classification)** problem.
- The goal of this project is to **classify Kaggle San Francisco Crime Description into 39 classes**.
- This model was built with **CNN, RNN (LSTM and GRU) and Word Embeddings** on **Tensorflow**.
### Data: [Kaggle San Francisco Crime](https://www.kaggle.com/c/sf-crime/data)
- Input: **Descript**
- Output: **Category**
- Examples:
Descript | Category
-----------|-----------
GRAND THEFT FROM LOCKED AUTO|LARCENY/THEFT
POSSESSION OF NARCOTICS PARAPHERNALIA|DRUG/NARCOTIC
AIDED CASE, MENTAL DISTURBED|NON-CRIMINAL
AGGRAVATED ASSAULT WITH BODILY FORCE|ASSAULT
ATTEMPTED ROBBERY ON THE STREET WITH A GUN|ROBBERY
### Train:
- Command: python3 train.py train_data.file train_parameters.json
- Example: ```python3 train.py ./data/train.csv.zip ./training_config.json```
### Predict:
- Command: python3 predict.py ./trained_results_dir/ new_data.csv
- Example: ```python3 predict.py ./trained_results_1478563595/ ./data/small_samples.csv```
### Reference:
- [Implement a cnn for text classification in tensorflow](http://www.wildml.com/2015/12/implementing-a-cnn-for-text-classification-in-tensorflow/)