项目
在 GitHub 查看
jiegzhan/multi-class-text-classification-cnn
关于
将 Kaggle Consumer Finance Complaints 分为 11 类。使用 TensorFlow、CNN(卷积神经网络)和词嵌入构建模型。
系统与基础设施可以做什么
- This is a multi-class text classification (sentence classification) problem.
- The purpose of this project is to classify Kaggle Consumer Finance Complaints into 11 classes.
- The model was built with Convolutional Neural Network (CNN) and Word Embeddings on TensorFlow 2 / Keras.
实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Project: Classify Kaggle Consumer Finance Complaints
Highlights:
- This is a multi-class text classification (sentence classification) problem.
- The purpose of this project is to classify Kaggle Consumer Finance Complaints into 11 classes.
- The model was built with Convolutional Neural Network (CNN) and Word Embeddings on TensorFlow 2 / Keras.
Data: Kaggle Consumer Finance Complaints
Input: consumer_complaint_narrative
- Example: "someone in north Carolina has stolen my identity information and has purchased items including XXXX cell phones thru XXXX on XXXX/XXXX/2015. A police report was filed as soon as I found out about it on XXXX/XXXX/2015. A investigation from XXXX is under way thru there fraud department and our local police department.\n"
Output: product
- Example: Credit reporting
Setup:
python3 -m venv .venv
source .venv/bin/activate
pip3 install -r requirements.txt
Train:
- Command:
python3 train.py <data_file> <params_file> - Example:
python3 train.py ./data/consumer_complaints.csv.zip ./parameters.json
A directory (trained_model_<timestamp>/) will be created during training:
best_model.keras— model with best validation accuracytrain_config.json— training metadata, label mapping, and vocabulary
Predict:
Provide the model directory (created when running train.py) and new data to predict.py.
- Command:
python3 predict.py <model_directory> <test_data.json> - Example:
python3 predict.py ./trained_model_1780290823/ ./data/small_samples.json
Predictions are saved to ./data/predictions_output.json.
Reference:
探索相关项目
加载中…