Skip to main content

One Side Behavioral Noise Reduction algorithm implementation

Project description

OSBNR: One Side Behavioral Noise Reduction

OSBNR (One Side Behavioral Noise Reduction) is an approach developed to deal with the problem of class imbalance in the presence of behavioral noise. This method is based on two stages: clustering and reduction. In the clustering stage, k-means algorithm is used to group similar instances of the minority class into multiple behavior clusters, each with distinct characteristics in the high-dimensional feature space. In the reduction stage, instances of the majority class, considered as behavioral noise, which overlap with the behavior clusters of the minority class are selected and eliminated.

The main steps of OSBNR approach are:

  1. Separate: Separate the majority class and minority class from the original training dataset.
  2. Clustering: Apply k-means clustering to group similar minority class instances into behavior clusters.
  3. Reduction: Eliminate the noisy majority class instances that overlap with the behavior clusters of the minority class.
  4. Combination: Combine the reduced majority class instances with the minority class instances to form a new training dataset.

Accurate identification and elimination of these instances maximize the visibility of the minority class instances and at the same time minimize excessive elimination of data.

This approach has been applied to various domains, including fraud detection, anomaly detection, and imbalanced datasets.

Usage

To use OSBNR, import the OSBNR class from the osbnr module and create an instance of the class with the desired number of clusters (k). Then, call the fit_resample method of the OSBNR instance, passing in the feature matrix (X) and label vector (y) of the original dataset. The method will return the balanced feature matrix and label vector.

from osbnr import OSBNR

osbnr = OSBNR(k=5)  # Create an instance of the OSBNR class with k=5 clusters
X_resampled, y_resampled = osbnr.fit_resample(X, y)  # Resample the dataset using OSBNR

Installation

To install OSBNR, use pip:

pip install osbnr

License

This project is licensed under the GNU License - see the LICENSE file for details.

Publications

  • El Hajjami, S., Malki, J., Bouju, A., & Berrada, M. (2020, October). A machine learning based approach to reduce behavioral noise problem in an imbalanced data: application to a fraud detection. In 2020 International Conference on Intelligent Data Science Technologies and Applications (IDSTA) (pp. 11-20). IEEE.

  • El Hajjami, S., Malki, J., Berrada, M., & Fourka, B. (2020, November). Machine learning for anomaly detection. performance study considering anomaly distribution in an imbalanced dataset. In 2020 5th International Conference on Cloud Computing and Artificial Intelligence: Technologies and Applications (CloudTech) (pp. 1-8). IEEE.

  • El Hajjami, S., Malki, J., Bouju, A., & Berrada, M. (2021). Machine Learning Facing Behavioral Noise Problem in an Imbalanced Data Using One Side Behavioral Noise Reduction: Application to a Fraud Detection. International Journal of Computer and Information Engineering, 15(3), 194-205.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

osbnr-0.1.2.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

osbnr-0.1.2-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file osbnr-0.1.2.tar.gz.

File metadata

  • Download URL: osbnr-0.1.2.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.7

File hashes

Hashes for osbnr-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4b267a5fccd51a9687c901f16998793f9866b71039f30ed3609eb6d5b738de44
MD5 8da3beb68b1ab408224ff00e28b54314
BLAKE2b-256 08c13db8d3d5cde2c6fcda3a62b6b09b2104a7d3988770e784960de1624257cc

See more details on using hashes here.

File details

Details for the file osbnr-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: osbnr-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 15.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.7

File hashes

Hashes for osbnr-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2068e1956092ddff673bf892e72df945d75c0e45fa1ef6ecbc49fbffee379d66
MD5 2ebf4fd8703c1e8e11a474c6f7ca9085
BLAKE2b-256 e10b5a7a4c14f3536aa7fc08105c83fb493af7683640a50f55f8376390807395

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page