A general interface for clustering based over-sampling algorithms.
Project description
cluster-over-sampling
Category | Tools |
---|---|
Development | |
Package | |
Documentation | |
Communication |
Introduction
A general interface for clustering based over-sampling algorithms.
Installation
cluster-over-sampling
is currently available on the PyPi's repository, and you can install it via pip
:
pip install cluster-over-sampling
SOM clusterer requires optional dependencies:
pip install cluster-over-sampling[som]
Similarly for Geometric SMOTE oversampler:
pip install cluster-over-sampling[gsmote]
You can also install both of them:
pip install cluster-over-sampling[all]
Usage
All the classes included in cluster-over-sampling
follow the imbalanced-learn API using the functionality of the base
oversampler. Using scikit-learn convention, the data are represented as follows:
- Input data
X
: 2D array-like or sparse matrices. - Targets
y
: 1D array-like.
The clustering-based oversamplers implement a fit
method to learn from X
and y
:
clustering_based_oversampler.fit(X, y)
They also implement a fit_resample
method to resample X
and y
:
X_resampled, y_resampled = clustering_based_oversampler.fit_resample(X, y)
References
If you use cluster-over-sampling
in a scientific publication, we would appreciate citations to any of the following papers:
[^1]: G. Douzas, F. Bacao, "Self-Organizing Map Oversampling (SOMO) for imbalanced data set learning", Expert Systems with Applications, vol. 82, pp. 40-52, 2017. [^2]: G. Douzas, F. Bacao, F. Last, "Improving imbalanced learning through a heuristic oversampling method based on k-means and SMOTE", Information Sciences, vol. 465, pp. 1-20, 2018. [^3]: G. Douzas, F. Bacao, F. Last, "G-SOMO: An oversampling approach based on self-organized maps and geometric SMOTE", Expert Systems with Applications, vol. 183,115230, 2021.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for cluster-over-sampling-0.5.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7edf4b43d36398936cadee26172d275c03a09a164a6abada43f0ec6d0a73aec9 |
|
MD5 | a70c46ecb16b5dd43ad13fbe012133de |
|
BLAKE2b-256 | b94e226bc1fa39fd9ec029cb3e5314e84b92fbcfca6e1fad98213537899ec6c1 |
Hashes for cluster_over_sampling-0.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fac4f7496102de9c1ba1e66cc35a31029e756fa5ac29a145351f243f6e45690e |
|
MD5 | 673a64bb241e864e5461ce0cf35a3f4f |
|
BLAKE2b-256 | 0089217a17ba7e773415069614116477ee05a932ec998a2290aaa2b6cdffdb3b |