Git Product home page Git Product logo

ecommerce-classification's Introduction

NLP Text Classification for E-commerce Dataset

This repository contains code for a text classification project focused on an e-commerce dataset. The goal is to classify product descriptions into different categories using Natural Language Processing (NLP) techniques and machine learning models.

Project Structure

  • Ecommerce_Model.ipynb: Jupyter Notebook containing the entire workflow from data preprocessing to model training and evaluation.
  • Ecommerce_Model.py: Python file containing the entire code for the model.
  • ecommerceDataset.csv: Dataset used for training the model.
  • README.md: This file, providing an overview of the project.

Dataset

The dataset (ecommerceDataset.csv) consists of two columns:

  • category: Product category.
  • text: Product description.

Data Preprocessing

  • Data cleaning and preprocessing steps include handling missing values, text normalization (lowercasing), and removal of stopwords.

Model Building

  • The model architecture includes an Embedding layer followed by LSTM layers for sequence processing.
  • Tokenization and padding are used to prepare text data for input into the model.

Training and Evaluation

  • The model is trained using sparse_categorical_crossentropy loss and Adam optimizer.
  • Training progress and validation metrics (accuracy) are monitored.
  • Early stopping is implemented to prevent overfitting.

Instructions

To run the notebook (Ecommerce_Model.ipynb):

  1. Clone the repository:
    git clone https://github.com/ArkZ10/NLP-Dicoding.git
  2. Open the notebook in Jupyter or Google Colab and execute each cell sequentially.

Usage

You can use the trained model to predict categories for new product descriptions. Example texts are provided in the notebook for testing predictions.

Dependencies

Python 3 Libraries: pandas, numpy, tensorflow, keras, sklearn, nltk, seaborn, matplotlib

Author

Yeftha Joshua

ecommerce-classification's People

Contributors

arkz10 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.