Skip to content
프로젝트

jiegzhan/multi-class-text-classification-cnn

GitHub에서 보기

소개

Kaggle Consumer Finance Complaints를 11개 클래스로 분류합니다. TensorFlow에서 CNN(합성곱 신경망)과 단어 임베딩을 사용해 모델을 구축합니다.

시스템 및 인프라

이 수치를 측정하는 방법

What you can do

  • 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.

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

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 accuracy
  • train_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:

관련 프로젝트 살펴보기

불러오는 중…