Giter Club home page Giter Club logo

mtsc_flysmote's Introduction

FLY-SMOTE: Re-balancing the non-IID IoT Edge Devices Data in Federated Learning System

In recent years, the data available from IoT devices have increased rapidly. Using a machine learning solution to detect faults in these devices requires the release of device data to a central server. However, these data typically contain sensitive information, leading to the need for privacy-preserving distributed machine learning solutions, such as federated learning, where a model is trained locally on the edge device, and only the trained model weights are shared with a central server. Device failure data are typically imbalanced, i.e., the number of failures is minimal compared to the number of normal samples. Therefore, re-balancing techniques are needed to improve the performance of a machine learning model. In this paper, we present FLY-SMOTE, a new approach to re-balance the data in different non-IID scenarios by generating synthetic data for the minority class in supervised learning tasks using a modified SMOTE method. Our approach takes $k$ samples from the minority class and generates $Y$ new synthetic samples based on one of the nearest neighbors of each $k$ sample. An experimental campaign on a real IoT dataset and three well-known public datasets show that the proposed solution improves the balance accuracy without compromising the model's accuracy.

The data used in this project:

Code

The code is divided as follows:

  • The main.py python file contains the necessary code to run an experiement.
  • The FlySmote.py contains the necessary functions to apply fly-smote re-balancing method.
  • the NNModel.py contains the neural network model.
  • The ReadData.py file contains the necessary functions to read the datasets.

To run a model on one dataset you should issue the following command:

python main.py -f <dataname> -d <data file name> -k <samples from miniority> -r <ratio of new samples>

Prerequisites

The python packages needed are:

  • numpy
  • pandas
  • sklearn
  • scipy
  • matplotlib
  • tensorflow
  • keras

Reference

If you re-use this work, please cite:

@ARTICLE{9800764,
  author={Younis, Raneen and Fisichella, Marco},
  journal={IEEE Access}, 
  title={FLY-SMOTE: Re-Balancing the Non-IID IoT Edge Devices Data in Federated Learning System}, 
  year={2022},
  volume={10},
  number={},
  pages={65092-65102},
  doi={10.1109/ACCESS.2022.3184309}}

mtsc_flysmote's People

Contributors

anonymousger avatar

Watchers

Nicolas Navarro-Guerrero avatar Kostas Georgiou 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.