Skip to content

A project predicting customer spending using machine learning. Features data cleaning and a deep neural network model. Processes raw customer data, handles date conversions, and encodes categories. Uses TensorFlow/Keras for the neural network. Includes plans for linear, ensemble, and tree-based models. Aims to help understand customer behavior.

License

Notifications You must be signed in to change notification settings

CLoaKY233/NeuralNetworks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Customer Spending Prediction Models

Python TensorFlow Scikit-learn Pandas NumPy

Table of Contents

Project Overview

This repository contains machine learning and deep learning models designed to predict customer spending patterns. The project demonstrates the application of data preprocessing, feature engineering, and model development to forecast customer expenditure.

Dataset

The project uses a custom dataset (MOCK_DATA.csv) containing customer information. This data is cleaned and preprocessed to create cleaned_customer_data.csv, which is used for training and testing our models.

Models

Deep Neural Network

Our deep learning model uses TensorFlow and Keras:

  • Multiple dense layers with dropout for regularization
  • ReLU activation for hidden layers, linear activation for output layer
  • Adam optimizer
  • L2 regularization and dropout to prevent overfitting

For details, see Deep Learning Model Details.

Ensemble Model

The ensemble model combines multiple algorithms:

  • Random Forest, Gradient Boosting, and Neural Network regressors
  • Voting Regressor as the ensemble method

For more information, refer to Ensemble Model Details.

Project Structure

.
├── datasets/
│   ├── MOCK_DATA.csv
│   └── cleaned_customer_data.csv
├── keras/
│   ├── deeplearn.py
│   └── info.md
├── scikitlearn/
│   ├── ensemble.py
│   └── info.md
├── preprocess/
│   ├── datacleaner.py
│   └── info.md
├── README.md
└── requirements.txt

Installation

  1. Clone the repository:

    git clone https://github.com/cloaky233/NeuralNetworks.git
    cd NeuralNetworks
    
  2. Install required packages:

    pip install -r requirements.txt
    

Usage

  1. Data Preprocessing:

    python preprocess/datacleaner.py
    
  2. Run Deep Learning Model:

    python keras/deeplearn.py
    
  3. Run Ensemble Model:

    python scikitlearn/ensemble.py
    

Results

The performance metrics for each model are printed after running the respective scripts. These include Mean Squared Error (MSE) and Mean Absolute Percentage Error (MAPE).

Documentation

Contributing

Contributions to improve the project are welcome. Please fork the repository and submit a pull request with your proposed changes.


About

A project predicting customer spending using machine learning. Features data cleaning and a deep neural network model. Processes raw customer data, handles date conversions, and encodes categories. Uses TensorFlow/Keras for the neural network. Includes plans for linear, ensemble, and tree-based models. Aims to help understand customer behavior.

Topics

Resources

License

Stars

Watchers

Forks

Languages