Skip to content

Repository files navigation

IoT Classification with PyTorch

This project demonstrates a simple IoT classification task using synthetic data with PyTorch. The goal is to classify IoT device data into different categories.

Project Structure

  • src/: Contains the Python code for the project.
    • generate_iot_data.py: Generates synthetic IoT data.
    • dataset.py: Contains PyTorch Dataset and DataLoader helpers.
    • model.py: Defines the neural network model.
    • train.py: Contains the training and testing loop.
    • utils.py: Provides utility functions like saving metrics to JSON.
  • requirements.txt: Lists the Python dependencies.
  • .gitignore: Specifies files and directories to be ignored by git.

Setup

  1. Install the required packages:

    pip install -r requirements.txt
    
  2. Generate synthetic IoT data:

    python -m src.generate_iot_data
    
  3. Train the model and produce results:

    python -m src.train --batch-size 32 --epochs 10 --lr 0.001 --train-ratio 0.8
    
  4. Install TypeScript and ts-node:

    npm install
    
  5. Display the model results:

    npx ts-node ts/src/results.ts
    

Requirements

  • Python 3.x
  • PyTorch
  • NumPy
  • Pandas
  • Scikit-learn

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages