Giter Site home page Giter Site logo

majobasgall / smote-mr Goto Github PK

View Code? Open in Web Editor NEW
3.0 0.0 0.0 19 KB

SMOTE-MR: A distributed Synthetic Minority Oversampling Technique (SMOTE) for Big Data which applies a MapReduce based-approach. SMOTE-MR is categorized as an `approximated/ non exact` solution. Also, there is an `exact` solution called SMOTE-BD written by the author (See: https://github.com/majobasgall/smote-bd)

License: Apache License 2.0

Scala 100.00%
smote imbalanced-data big-data machile-learning spark scala

smote-mr's Introduction

SMOTE-MR

SMOTE-MR: A distributed Synthetic Minority Oversampling Technique (SMOTE) [1] for Big Data which applies a MapReduce based-approach. SMOTE-MR is categorized as an approximated/ non exact solution. Also, there is an exact solution called SMOTE-BD written by the author (See: https://github.com/majobasgall/smote-bd)

How to run it?

A generic example to run it could be:

spark-submit --master "URL" --executor-memory "XG" "path-to-jar".jar --class "path-to-main" --datasetName="aName" --headerFile="path-to-header" --inputFile="path-to-input" --delimiter=", " --outputPah="path-to-output" --seed="aSeed" --K="number-of-neighbours" --numPartitions="number-of-parts" --nReducers="number-of-reducers" --numIterations="number-of-iterations" --minClassName="min-class-name" -overPercentage=100

  • Parameters of spark: --master "URL" | --executor-memory "XG" . They can be useful for launch with diferent settings and datasets.
  • --class path.to.the.main aJarFile.jar Determine the jar file to be run.
  • datasetName The name of the current dataset.
  • headerFile Full path to header file.
  • inputFile Full path to input file.
  • delimiter Delimiter of each attribute value.
  • outputPah Full path to output directory.
  • seed A seed to generate random numbers.
  • K Number of nearest neighbours.
  • numPartitions Number of partitions to split data.
  • nReducers Number of reducers (required by the K-NN stage).
  • numIterations Number of iterations (required by the K-NN stage).
  • minClassName Name of the minority class (according to the header file).
  • overPercentage Percentage of balancing between classes.

References

[1] Chawla, N. V., Bowyer, K. W., Hall, L. O., & Kegelmeyer, W. P. (2002). SMOTE: Synthetic Minority Over-sampling Technique. J. Artif. Int. Res., 16(1), 321โ€“357.

smote-mr's People

Contributors

majobasgall avatar mjbasgall avatar

Stargazers

 avatar  avatar  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.