ImbalancedLearningRegression


NameImbalancedLearningRegression JSON
Version 0.0.2 PyPI version JSON
download
home_pagehttps://github.com/paobranco/ImbalancedLearningRegression
SummaryPython implementations of preprocesssing imbalanced data for regression
upload_time2024-05-26 03:50:51
maintainerNone
docs_urlNone
authorPaula Branco, Wenglei Wu, Alex Chengen Lyu, Lingyi Kong, Gloria Hu
requires_pythonNone
licenseNone
keywords smote gaussian noise condensed nearest neighbour edited nearest neighbour tomek links adasyn over-sampling under-sampling synthetic data imbalanced data pre-processing regression
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
## Imbalanced Learning Regression
[![PyPI version](https://badge.fury.io/py/ImbalancedLearningRegression.svg)](https://badge.fury.io/py/ImbalancedLearningRegression)
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
![GitHub last commit](https://img.shields.io/github/last-commit/paobranco/ImbalancedLearningRegression)

## Description
A Python implementation of sampling techniques for Regression. Conducts different sampling techniques for Regression. Useful for prediction problems where regression is applicable, but the values in the interest of predicting are rare or uncommon. This can also serve as a useful alternative to log transforming a skewed response variable, especially if generating synthetic data is also of interest.
<br>

## Citation
If you use the code from this repository, please cite the following article:

*Wu, W., Kunz, N., & Branco, P. (2022, September). ImbalancedLearningRegression-A Python Package to Tackle the Imbalanced Regression Problem. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases (pp. 645-648). Cham: Springer Nature Switzerland.*

For bibtex users:

@inproceedings{wu2022imbalancedlearningregression,
  title={ImbalancedLearningRegression-A Python Package to Tackle the Imbalanced Regression Problem},
  author={Wu, Wenglei and Kunz, Nicholas and Branco, Paula},
  booktitle={Joint European Conference on Machine Learning and Knowledge Discovery in Databases},
  pages={645--648},
  year={2022},
  organization={Springer}
}

Article Link: 
https://link.springer.com/chapter/10.1007/978-3-031-26422-1_48


## Features
1. An open-source Python supported version of sampling techniques for Regression, a variation of Nick Kunz's package SMOGN.

2. Supports Pandas DataFrame inputs containing mixed data types.

3. Flexible inputs available to control the areas of interest within a continuous response variable and friendly parameters for re-sampling data.

4. Purely Pythonic, developed for consistency, maintainability, and future improvement, no foreign function calls to C or Fortran, as contained in original R implementation.

## Requirements
1. Python 3
2. NumPy
3. Pandas
4. Scikit-learn

## Installation
```python
## install pypi release
pip install ImbalancedLearningRegression

## install developer version
pip install git+https://github.com/paobranco/ImbalancedLearningRegression.git
```

## Usage
```python
## load libraries
import pandas
import ImbalancedLearningRegression as iblr

## load data
housing = pandas.read_csv(
    ## http://jse.amstat.org/v19n3/decock.pdf
    "https://raw.githubusercontent.com/paobranco/ImbalancedLearningRegression/master/data/housing.csv"
)

## conduct Random Over-sampling
housing_ro = iblr.ro(
    data = housing, 
    y = "SalePrice"
)

## conduct Introduction of Gaussian Noise
housing_gn = iblr.gn(
    data = housing, 
    y = "SalePrice"
)
```

## Examples
1. [Random Over-sampling](https://github.com/paobranco/ImbalancedLearningRegression/blob/master/examples/Random%20Over-sampling.ipynb) <br>
2. [Introduction of Gaussian Noise](https://github.com/paobranco/ImbalancedLearningRegression/blob/master/examples/Gaussian_noise.ipynb) <br>
3. [Condensed Nearest Neighbor](https://github.com/paobranco/ImbalancedLearningRegression/blob/master/examples/Condensed%20Nearest%20Neighbour.ipynb) <br>
4. [Edited Nearest Neighbor](https://github.com/paobranco/ImbalancedLearningRegression/blob/master/examples/Edited%20Nearest%20Neighbour.ipynb) <br>

For the examples of other techniques, please refer to [here](https://github.com/paobranco/ImbalancedLearningRegression/tree/master/examples). <br>

## Documentation
The documentation of the package can be found [here](https://imbalancedlearningregression.readthedocs.io/en/latest). <br>

## License

© Paula Branco, 2022. Licensed under the General Public License v3.0 (GPLv3).

## Contributions

ImbalancedLearningRegression is open for improvements and maintenance. Your help is valued to make the package better for everyone.

## Reference

Branco, P., Torgo, L., Ribeiro, R. (2017). SMOGN: A Pre-Processing Approach for Imbalanced Regression. Proceedings of Machine Learning Research, 74:36-50. http://proceedings.mlr.press/v74/branco17a/branco17a.pdf

Branco, P., Torgo, L., & Ribeiro, R. P. (2019). Pre-processing approaches for imbalanced distributions in regression. Neurocomputing, 343, 76-99. https://www.sciencedirect.com/science/article/abs/pii/S0925231219301638

Chawla, N. V., Bowyer, K. W., Hall, L. O., & Kegelmeyer, W. P. (2002). SMOTE: synthetic minority over-sampling technique. Journal of artificial intelligence research, 16, 321-357. https://www.jair.org/index.php/jair/article/view/10302

Elhassan, T., & Aljurf, M. (2016). Classification of imbalance data using tomek link (t-link) combined with random under-sampling (rus) as a data reduction method. Global J Technol Optim S, 1. https://www.researchgate.net/profile/Mohamed-Shoukri-2/publication/326590590_Classification_of_Imbalance_Data_using_Tomek_Link_T-Link_Combined_with_Random_Under-sampling_RUS_as_a_Data_Reduction_Method/links/5b96a6a0a6fdccfd543cbc40/Classification-of-Imbalance-Data-using-Tomek-Link-T-Link-Combined-with-Random-Under-sampling-RUS-as-a-Data-Reduction-Method.pdf

Hart, P. (1968). The condensed nearest neighbor rule (corresp.). IEEE transactions on information theory, 14(3), 515-516. https://ieeexplore.ieee.org/document/1054155

He, H., Bai, Y., Garcia, E. A., & Li, S. (2008, June). ADASYN: Adaptive synthetic sampling approach for imbalanced learning. In 2008 IEEE international joint conference on neural networks (IEEE world congress on computational intelligence) (pp. 1322-1328). IEEE. https://www.ele.uri.edu/faculty/he/PDFfiles/adasyn.pdf

Kunz, N., (2019). SMOGN. https://github.com/nickkunz/smogn

Menardi, G., & Torelli, N. (2014). Training and assessing classification rules with imbalanced data. Data mining and knowledge discovery, 28(1), 92-122. https://link.springer.com/article/10.1007/s10618-012-0295-5

Tomek, I. (1976). Two modifications of CNN. IEEE Trans. Systems, Man and Cybernetics, 6, 769-772. https://ieeexplore.ieee.org/document/4309452

Torgo, L., Ribeiro, R. P., Pfahringer, B., & Branco, P. (2013, September). Smote for regression. In Portuguese conference on artificial intelligence (pp. 378-389). Springer, Berlin, Heidelberg. https://link.springer.com/chapter/10.1007/978-3-642-40669-0_33

Wilson, D. L. (1972). Asymptotic properties of nearest neighbor rules using edited data. IEEE Transactions on Systems, Man, and Cybernetics, (3), 408-421. https://ieeexplore.ieee.org/abstract/document/4309137





            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/paobranco/ImbalancedLearningRegression",
    "name": "ImbalancedLearningRegression",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "smote, Gaussian noise, condensed nearest neighbour, edited nearest neighbour, Tomek links, ADASYN, over-sampling, under-sampling, synthetic data, imbalanced data, pre-processing, regression",
    "author": "Paula Branco, Wenglei Wu, Alex Chengen Lyu, Lingyi Kong, Gloria Hu",
    "author_email": "pbranco@uottawa.ca, wwu077@uottawa.ca, clyu039@uottawa.ca, lkong073@uottawa.ca, xhu005@uottawa.ca",
    "download_url": "https://files.pythonhosted.org/packages/19/2e/e2759996b048be5ac12b06eac279094639424aa22c7775d0c87f77c9b23b/imbalancedlearningregression-0.0.2.tar.gz",
    "platform": null,
    "description": "\r\n## Imbalanced Learning Regression\r\n[![PyPI version](https://badge.fury.io/py/ImbalancedLearningRegression.svg)](https://badge.fury.io/py/ImbalancedLearningRegression)\r\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\r\n![GitHub last commit](https://img.shields.io/github/last-commit/paobranco/ImbalancedLearningRegression)\r\n\r\n## Description\r\nA Python implementation of sampling techniques for Regression. Conducts different sampling techniques for Regression. Useful for prediction problems where regression is applicable, but the values in the interest of predicting are rare or uncommon. This can also serve as a useful alternative to log transforming a skewed response variable, especially if generating synthetic data is also of interest.\r\n<br>\r\n\r\n## Citation\r\nIf you use the code from this repository, please cite the following article:\r\n\r\n*Wu, W., Kunz, N., & Branco, P. (2022, September). ImbalancedLearningRegression-A Python Package to Tackle the Imbalanced Regression Problem. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases (pp. 645-648). Cham: Springer Nature Switzerland.*\r\n\r\nFor bibtex users:\r\n\r\n@inproceedings{wu2022imbalancedlearningregression,\r\n  title={ImbalancedLearningRegression-A Python Package to Tackle the Imbalanced Regression Problem},\r\n  author={Wu, Wenglei and Kunz, Nicholas and Branco, Paula},\r\n  booktitle={Joint European Conference on Machine Learning and Knowledge Discovery in Databases},\r\n  pages={645--648},\r\n  year={2022},\r\n  organization={Springer}\r\n}\r\n\r\nArticle Link: \r\nhttps://link.springer.com/chapter/10.1007/978-3-031-26422-1_48\r\n\r\n\r\n## Features\r\n1. An open-source Python supported version of sampling techniques for Regression, a variation of Nick Kunz's package SMOGN.\r\n\r\n2. Supports Pandas DataFrame inputs containing mixed data types.\r\n\r\n3. Flexible inputs available to control the areas of interest within a continuous response variable and friendly parameters for re-sampling data.\r\n\r\n4. Purely Pythonic, developed for consistency, maintainability, and future improvement, no foreign function calls to C or Fortran, as contained in original R implementation.\r\n\r\n## Requirements\r\n1. Python 3\r\n2. NumPy\r\n3. Pandas\r\n4. Scikit-learn\r\n\r\n## Installation\r\n```python\r\n## install pypi release\r\npip install ImbalancedLearningRegression\r\n\r\n## install developer version\r\npip install git+https://github.com/paobranco/ImbalancedLearningRegression.git\r\n```\r\n\r\n## Usage\r\n```python\r\n## load libraries\r\nimport pandas\r\nimport ImbalancedLearningRegression as iblr\r\n\r\n## load data\r\nhousing = pandas.read_csv(\r\n    ## http://jse.amstat.org/v19n3/decock.pdf\r\n    \"https://raw.githubusercontent.com/paobranco/ImbalancedLearningRegression/master/data/housing.csv\"\r\n)\r\n\r\n## conduct Random Over-sampling\r\nhousing_ro = iblr.ro(\r\n    data = housing, \r\n    y = \"SalePrice\"\r\n)\r\n\r\n## conduct Introduction of Gaussian Noise\r\nhousing_gn = iblr.gn(\r\n    data = housing, \r\n    y = \"SalePrice\"\r\n)\r\n```\r\n\r\n## Examples\r\n1. [Random Over-sampling](https://github.com/paobranco/ImbalancedLearningRegression/blob/master/examples/Random%20Over-sampling.ipynb) <br>\r\n2. [Introduction of Gaussian Noise](https://github.com/paobranco/ImbalancedLearningRegression/blob/master/examples/Gaussian_noise.ipynb) <br>\r\n3. [Condensed Nearest Neighbor](https://github.com/paobranco/ImbalancedLearningRegression/blob/master/examples/Condensed%20Nearest%20Neighbour.ipynb) <br>\r\n4. [Edited Nearest Neighbor](https://github.com/paobranco/ImbalancedLearningRegression/blob/master/examples/Edited%20Nearest%20Neighbour.ipynb) <br>\r\n\r\nFor the examples of other techniques, please refer to [here](https://github.com/paobranco/ImbalancedLearningRegression/tree/master/examples). <br>\r\n\r\n## Documentation\r\nThe documentation of the package can be found [here](https://imbalancedlearningregression.readthedocs.io/en/latest). <br>\r\n\r\n## License\r\n\r\n\u00c2\u00a9 Paula Branco, 2022. Licensed under the General Public License v3.0 (GPLv3).\r\n\r\n## Contributions\r\n\r\nImbalancedLearningRegression is open for improvements and maintenance. Your help is valued to make the package better for everyone.\r\n\r\n## Reference\r\n\r\nBranco, P., Torgo, L., Ribeiro, R. (2017). SMOGN: A Pre-Processing Approach for Imbalanced Regression. Proceedings of Machine Learning Research, 74:36-50. http://proceedings.mlr.press/v74/branco17a/branco17a.pdf\r\n\r\nBranco, P., Torgo, L., & Ribeiro, R. P. (2019). Pre-processing approaches for imbalanced distributions in regression. Neurocomputing, 343, 76-99. https://www.sciencedirect.com/science/article/abs/pii/S0925231219301638\r\n\r\nChawla, N. V., Bowyer, K. W., Hall, L. O., & Kegelmeyer, W. P. (2002). SMOTE: synthetic minority over-sampling technique. Journal of artificial intelligence research, 16, 321-357. https://www.jair.org/index.php/jair/article/view/10302\r\n\r\nElhassan, T., & Aljurf, M. (2016). Classification of imbalance data using tomek link (t-link) combined with random under-sampling (rus) as a data reduction method. Global J Technol Optim S, 1. https://www.researchgate.net/profile/Mohamed-Shoukri-2/publication/326590590_Classification_of_Imbalance_Data_using_Tomek_Link_T-Link_Combined_with_Random_Under-sampling_RUS_as_a_Data_Reduction_Method/links/5b96a6a0a6fdccfd543cbc40/Classification-of-Imbalance-Data-using-Tomek-Link-T-Link-Combined-with-Random-Under-sampling-RUS-as-a-Data-Reduction-Method.pdf\r\n\r\nHart, P. (1968). The condensed nearest neighbor rule (corresp.). IEEE transactions on information theory, 14(3), 515-516. https://ieeexplore.ieee.org/document/1054155\r\n\r\nHe, H., Bai, Y., Garcia, E. A., & Li, S. (2008, June). ADASYN: Adaptive synthetic sampling approach for imbalanced learning. In 2008 IEEE international joint conference on neural networks (IEEE world congress on computational intelligence) (pp. 1322-1328). IEEE. https://www.ele.uri.edu/faculty/he/PDFfiles/adasyn.pdf\r\n\r\nKunz, N., (2019). SMOGN. https://github.com/nickkunz/smogn\r\n\r\nMenardi, G., & Torelli, N. (2014). Training and assessing classification rules with imbalanced data. Data mining and knowledge discovery, 28(1), 92-122. https://link.springer.com/article/10.1007/s10618-012-0295-5\r\n\r\nTomek, I. (1976). Two modifications of CNN. IEEE Trans. Systems, Man and Cybernetics, 6, 769-772. https://ieeexplore.ieee.org/document/4309452\r\n\r\nTorgo, L., Ribeiro, R. P., Pfahringer, B., & Branco, P. (2013, September). Smote for regression. In Portuguese conference on artificial intelligence (pp. 378-389). Springer, Berlin, Heidelberg. https://link.springer.com/chapter/10.1007/978-3-642-40669-0_33\r\n\r\nWilson, D. L. (1972). Asymptotic properties of nearest neighbor rules using edited data. IEEE Transactions on Systems, Man, and Cybernetics, (3), 408-421. https://ieeexplore.ieee.org/abstract/document/4309137\r\n\r\n\r\n\r\n\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Python implementations of preprocesssing imbalanced data for regression",
    "version": "0.0.2",
    "project_urls": {
        "Homepage": "https://github.com/paobranco/ImbalancedLearningRegression"
    },
    "split_keywords": [
        "smote",
        " gaussian noise",
        " condensed nearest neighbour",
        " edited nearest neighbour",
        " tomek links",
        " adasyn",
        " over-sampling",
        " under-sampling",
        " synthetic data",
        " imbalanced data",
        " pre-processing",
        " regression"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "16f69796f11c110ea44d967fdf8be1ced9fe62ee55b8a8dca3d1a6198901e390",
                "md5": "025a2d61931df5d541947d32a0fb536e",
                "sha256": "cd368f9f550b1cbb9a6e6cac621da848ba842f5f6525b2970413cf2f72173b77"
            },
            "downloads": -1,
            "filename": "ImbalancedLearningRegression-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "025a2d61931df5d541947d32a0fb536e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 77243,
            "upload_time": "2024-05-26T03:50:50",
            "upload_time_iso_8601": "2024-05-26T03:50:50.096563Z",
            "url": "https://files.pythonhosted.org/packages/16/f6/9796f11c110ea44d967fdf8be1ced9fe62ee55b8a8dca3d1a6198901e390/ImbalancedLearningRegression-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "192ee2759996b048be5ac12b06eac279094639424aa22c7775d0c87f77c9b23b",
                "md5": "1ac771e2198dce78d77f52a672ad7b9e",
                "sha256": "a3a19d8153aeb7adc360726ad874174f043312cce88dd9fec0fcf87d6cc60abd"
            },
            "downloads": -1,
            "filename": "imbalancedlearningregression-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "1ac771e2198dce78d77f52a672ad7b9e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 52294,
            "upload_time": "2024-05-26T03:50:51",
            "upload_time_iso_8601": "2024-05-26T03:50:51.575330Z",
            "url": "https://files.pythonhosted.org/packages/19/2e/e2759996b048be5ac12b06eac279094639424aa22c7775d0c87f77c9b23b/imbalancedlearningregression-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-26 03:50:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "paobranco",
    "github_project": "ImbalancedLearningRegression",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "imbalancedlearningregression"
}
        
Elapsed time: 4.36102s