GithubHelp home page GithubHelp logo

gan-n's Introduction

Gan-n

Project Summary

Overview

This project implements a Generative Adversarial Network (GAN) to generate synthetic data for imbalanced datasets. The generated data is intended to augment the minority class in binary classification tasks, improving model performance.

Key Components

  1. Data Preprocessing

    • Load and preprocess data from a CSV file.
    • Separate minority and majority classes.
    • Use SMOTEEN to generate additional samples for the minority class.
  2. GAN Architecture

    • Generator: Maps random noise vectors (latent space) to synthetic data samples.
    • Discriminator: Distinguishes between real and synthetic data samples.
  3. Training the GAN

    • Train the generator and discriminator iteratively.
    • Use the Binary Cross-Entropy loss function.
    • Optimize using Adam optimizer.
  4. Main Script

    • Load and preprocess data.
    • Train the GAN.
    • Save the trained generator model.

Files and Directories

  • src/: Contains modules for GAN training and data preprocessing.
  • models/: Directory to save trained GAN models.
  • Datasets/: Contains the CSV data files for training.

How to Run

  1. Set Up Environment

    • Install dependencies: pip install -r requirements.txt
  2. Train the GAN

    • Run the main script: dvc repro, to track the chnages.
    • Specify the target column and data file path in the script.

Example Usage

python3 main.py

Dependencies

  • PyTorch
  • NumPy
  • SMOTEEN (Imbalanced-learn)

Goals

  • Address class imbalance in datasets.
  • Improve classification performance by augmenting training data with synthetic samples.
  • Utilizes docker and DVC for data version controlling, re-experimenation and containerization

gan-n's People

Contributors

udit-rawat 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.