Skip to main content

Crucio is a python sci-kit learn inspired package for class imbalance. It use some classic methods for class balancing taking as parameters a data frame and the target column.

Project description

Crucio is a python sci-kit learn inspired package for class imbalance. It use some classic methods for class balancing taking as parameters a data frame and the target column.

This version of crucio has the next methods of feature selection:

  1. ADASYN

  2. ICOTE (Immune Centroids Oversampling)

  3. MTDF (Mega-Trend Difussion Function)

  4. MWMOTE (Majority Weighted Minority Oversampling Technique)

  5. SMOTE (Synthetic Minority Oversampling Technique)

  6. SMOTENC (Synthetic Minority Over-sampling Technique for Nominal and Continuous)

  7. SMOTETOMEK (Synthetic Minority Oversampling Technique + Tomek links for undersampling)

  8. SMOTEENN (Synthetic Minority Oversampling Technique + ENN for undersampling)

  9. SCUT (SMOTE and Clustered Undersampling Technique)

  10. SLS (Safe-Level-Synthetic Minority Over-Sampling TEchnique)

  11. TKRKNN (Top-K ReverseKNN)

All these methods takes the pandas Data Frame and y column to balance on.

How to use crucio

To use balancer from crucio you should just import the balancer from crucio in the following framework:

`` from crucio import SMOTE ``

class names are written above in parantheses.

Next create a object of this algorithm (I will use ADASYN method as an example).

` method = ADASYN() `

To balance the dataset on the target column use the ‘balance’ function, using as parameters the pandas Data Frame and the column that you want to balance.

` new_dataframe = method.balance(df, 'target') `

Returned value is a new data frame with the target column balanced.

With love from Sigmoid.

We are open for feedback. Please send your impression to vladimir.stojoc@gmail.com

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

crucio-0.1.8.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

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

crucio-0.1.8-py3-none-any.whl (29.3 kB view details)

Uploaded Python 3

File details

Details for the file crucio-0.1.8.tar.gz.

File metadata

  • Download URL: crucio-0.1.8.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.2

File hashes

Hashes for crucio-0.1.8.tar.gz
Algorithm Hash digest
SHA256 4bced015f31505c1f25a483f1daba2b7545ed4031bac127e9785ffc7340ab1e9
MD5 978cf8922695ce66c27aa5e85739bd67
BLAKE2b-256 755e9a29f8430eefe7d56df5aa81f9faa2a846595845da0541f83f06c8e615a4

See more details on using hashes here.

File details

Details for the file crucio-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: crucio-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 29.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.2

File hashes

Hashes for crucio-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 6b1bc721fffc6d4de83cae9eb0514822291411eaad083ddfa2dbf3067361ec6f
MD5 aa2b62e10dcf082e2fa901038731ee58
BLAKE2b-256 6e121e6773a47409534c8aa171643f705a156f4aeecc0c5e9ab68b3ef8a18dd5

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