evorbf


Nameevorbf JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/thieu1995/evorbf
SummaryEvoRBF: Evolving Radial Basis Function Network by Intelligent Nature-inspired Algorithms
upload_time2024-05-11 07:32:35
maintainerNone
docs_urlNone
authorThieu
requires_python>=3.8
licenseGPLv3
keywords radial basis function machine learning artificial intelligence deep learning neural networks single hidden layer network metaheuristic-based rbfrandom projection kernel methods feature extraction classification regression supervised learning optimization algorithms kernel rbf cross-validationgenetic algorithm (ga) particle swarm optimization (pso) ant colony optimization (aco) differential evolution (de) simulated annealing grey wolf optimizer (gwo) whale optimization algorithm (woa) confusion matrix recall precision accuracy k-nearest neighbors random forest support vector machine scikit-learn models estimator robust machine learning shallow neural network nature-inspired rbf rbf network convergence analysis search space exploration local search computational intelligence robust optimization performance analysis intelligent optimization simulations
VCS
bugtrack_url
requirements numpy scipy scikit-learn pandas mealpy permetrics pytest pytest-cov flake8
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
<p align="center">
<img style="max-width:100%;" src="https://thieu1995.github.io/post/2023-08/evorbf1.png" alt="EvoRBF"/>
</p>

---


[![GitHub release](https://img.shields.io/badge/release-1.0.0-yellow.svg)](https://github.com/thieu1995/evorbf/releases)
[![Wheel](https://img.shields.io/pypi/wheel/gensim.svg)](https://pypi.python.org/pypi/evorbf) 
[![PyPI version](https://badge.fury.io/py/evorbf.svg)](https://badge.fury.io/py/evorbf)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/evorbf.svg)
![PyPI - Status](https://img.shields.io/pypi/status/evorbf.svg)
![PyPI - Downloads](https://img.shields.io/pypi/dm/evorbf.svg)
[![Downloads](https://static.pepy.tech/badge/evorbf)](https://pepy.tech/project/evorbf)
[![Tests & Publishes to PyPI](https://github.com/thieu1995/evorbf/actions/workflows/publish-package.yaml/badge.svg)](https://github.com/thieu1995/evorbf/actions/workflows/publish-package.yaml)
![GitHub Release Date](https://img.shields.io/github/release-date/thieu1995/evorbf.svg)
[![Documentation Status](https://readthedocs.org/projects/evorbf/badge/?version=latest)](https://evorbf.readthedocs.io/en/latest/?badge=latest)
[![Chat](https://img.shields.io/badge/Chat-on%20Telegram-blue)](https://t.me/+fRVCJGuGJg1mNDg1)
![GitHub contributors](https://img.shields.io/github/contributors/thieu1995/evorbf.svg)
[![GitTutorial](https://img.shields.io/badge/PR-Welcome-%23FF8300.svg?)](https://git-scm.com/book/en/v2/GitHub-Contributing-to-a-Project)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.11136007.svg)](https://doi.org/10.5281/zenodo.11136007)
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)


**EvoRBF** is a Python library that implements a framework 
for training Radial Basis Function (RBF) networks using `Intelligence Nature-inspired Algorithms (INAs)`. It provides a 
comparable alternative to the traditional RBF network and is compatible with the Scikit-Learn library. With EvoRBF, you can 
perform searches and hyperparameter tuning using the functionalities provided by the Scikit-Learn library.

| **EvoRBF**                   | **Evolving Radial Basis Function Network**                                  |
|------------------------------|-----------------------------------------------------------------------------|
| **Free software**            | GNU General Public License (GPL) V3 license                                 |
| **Provided Estimator**       | RbfRegressor, RbfClassifier, InaRbfRegressor, InaRbfClassifier, InaRbfTuner |
| **Provided ML models**       | \> 400 Models                                                               |
| **Supported metrics**        | \>= 67 (47 regressions and 20 classifications)                              |
| **Supported loss functions** | \>= 61 (45 regressions and 16 classifications)                              |
| **Documentation**            | https://evorbf.readthedocs.io                                               | 
| **Python versions**          | \>= 3.8.x                                                                   |  
| **Dependencies**             | numpy, scipy, scikit-learn, pandas, mealpy, permetrics                      |


# Citation Request 

If you want to understand how Intelligence Nature-inspired Algorithms is applied to Radial Basis Function Network, you 
need to read the paper titled "Application of artificial intelligence in estimating mining capital expenditure using radial basis function neural network optimized by metaheuristic algorithms". 
The paper can be accessed at the following [this link](https://doi.org/10.1016/B978-0-443-18764-3.00015-1)


```bibtex
@software{thieu_2024_11136008,
  author       = {Nguyen Van Thieu},
  title        = {EvoRBF: Evolving Radial Basis Function Network by Intelligent Nature-inspired Algorithms},
  month        = may,
  year         = 2024,
  publisher    = {Zenodo},
  doi          = {10.5281/zenodo.11136007},
  url          = {https://doi.org/10.5281/zenodo.11136007}
}

@article{van2023mealpy,
  title={MEALPY: An open-source library for latest meta-heuristic algorithms in Python},
  author={Van Thieu, Nguyen and Mirjalili, Seyedali},
  journal={Journal of Systems Architecture},
  year={2023},
  publisher={Elsevier},
  doi={10.1016/j.sysarc.2023.102871}
}
```


# Usage

* Install the [current PyPI release](https://pypi.python.org/pypi/evorbf):
```sh 
$ pip install evorbf
```

After installation, you can check EvoRBF version:

```sh
$ python
>>> import evorbf
>>> evorbf.__version__
```

In this example below, we will use Whale Optimization Algorithm to optimize the `sigmas` (in non-linear Gaussian 
kernel) and `weights` (of hidden-output layer) in RBF network (WOA-RBF model) for Diabetes prediction problem.

```python
import numpy as np
from evorbf import Data, InaRbfRegressor
from sklearn.datasets import load_diabetes

## Load data object
# total samples = 442, total features = 10
X, y = load_diabetes(return_X_y=True)
data = Data(X, y)

## Split train and test
data.split_train_test(test_size=0.2, random_state=2)
print(data.X_train.shape, data.X_test.shape)

## Scaling dataset
data.X_train, scaler_X = data.scale(data.X_train, scaling_methods=("standard"))
data.X_test = scaler_X.transform(data.X_test)

data.y_train, scaler_y = data.scale(data.y_train, scaling_methods=("standard", ))
data.y_test = scaler_y.transform(np.reshape(data.y_test, (-1, 1)))

## Create model
opt_paras = {"name": "WOA", "epoch": 500, "pop_size": 20}
model = InaRbfRegressor(size_hidden=25, center_finder="kmean", regularization=False, lamda=0.5, obj_name="MSE",
                        optimizer="BaseGA", optimizer_paras=opt_paras, verbose=True, seed=42)

## Train the model
model.fit(data.X_train, data.y_train, lb=-1., ub=2.)

## Test the model
y_pred = model.predict(data.X_test)

print(model.optimizer.g_best.solution)
## Calculate some metrics
print(model.score(X=data.X_test, y=data.y_test, method="RMSE"))
print(model.scores(X=data.X_test, y=data.y_test, list_methods=["R2", "R", "KGE", "MAPE"]))
print(model.evaluate(y_true=data.y_test, y_pred=y_pred, list_metrics=["MSE", "RMSE", "R2S", "NSE", "KGE", "MAPE"]))
```

Please go check out the [examples](/examples) folder. You'll be surprised by what this library can do for your problem.
You can also read the [documentation](https://evorbf.readthedocs.io/) for more detailed installation 
instructions, explanations, and examples.


### Official Links (Get support for questions and answers)

* [Official source code repository](https://github.com/thieu1995/evorbf)
* [Official document](https://evorbf.readthedocs.io/)
* [Download releases](https://pypi.org/project/evorbf/) 
* [Issue tracker](https://github.com/thieu1995/evorbf/issues) 
* [Notable changes log](/ChangeLog.md)
* [Official discussion group](https://t.me/+fRVCJGuGJg1mNDg1)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/thieu1995/evorbf",
    "name": "evorbf",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "radial basis function, machine learning, artificial intelligence, deep learning, neural networks, single hidden layer network, metaheuristic-based RBFrandom projection, kernel methods, feature extraction, classification, regression, supervised learning, optimization algorithms, Kernel RBF, Cross-validationGenetic algorithm (GA), Particle swarm optimization (PSO), Ant colony optimization (ACO), Differential evolution (DE), Simulated annealing, Grey wolf optimizer (GWO), Whale Optimization Algorithm (WOA), confusion matrix, recall, precision, accuracy, K-Nearest Neighbors, random forest, support vector machine, scikit-learn models, estimator, Robust machine learning, shallow neural network, nature-inspired RBF, RBF network, Convergence analysis, Search space exploration, Local search, Computational intelligence, Robust optimization, Performance analysis, Intelligent optimization, Simulations",
    "author": "Thieu",
    "author_email": "nguyenthieu2102@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/ec/22/760e70f2786d9e67a0c90be579716c1ca670ed7b17cc061c970654d3cccd/evorbf-1.0.0.tar.gz",
    "platform": null,
    "description": "\n<p align=\"center\">\n<img style=\"max-width:100%;\" src=\"https://thieu1995.github.io/post/2023-08/evorbf1.png\" alt=\"EvoRBF\"/>\n</p>\n\n---\n\n\n[![GitHub release](https://img.shields.io/badge/release-1.0.0-yellow.svg)](https://github.com/thieu1995/evorbf/releases)\n[![Wheel](https://img.shields.io/pypi/wheel/gensim.svg)](https://pypi.python.org/pypi/evorbf) \n[![PyPI version](https://badge.fury.io/py/evorbf.svg)](https://badge.fury.io/py/evorbf)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/evorbf.svg)\n![PyPI - Status](https://img.shields.io/pypi/status/evorbf.svg)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/evorbf.svg)\n[![Downloads](https://static.pepy.tech/badge/evorbf)](https://pepy.tech/project/evorbf)\n[![Tests & Publishes to PyPI](https://github.com/thieu1995/evorbf/actions/workflows/publish-package.yaml/badge.svg)](https://github.com/thieu1995/evorbf/actions/workflows/publish-package.yaml)\n![GitHub Release Date](https://img.shields.io/github/release-date/thieu1995/evorbf.svg)\n[![Documentation Status](https://readthedocs.org/projects/evorbf/badge/?version=latest)](https://evorbf.readthedocs.io/en/latest/?badge=latest)\n[![Chat](https://img.shields.io/badge/Chat-on%20Telegram-blue)](https://t.me/+fRVCJGuGJg1mNDg1)\n![GitHub contributors](https://img.shields.io/github/contributors/thieu1995/evorbf.svg)\n[![GitTutorial](https://img.shields.io/badge/PR-Welcome-%23FF8300.svg?)](https://git-scm.com/book/en/v2/GitHub-Contributing-to-a-Project)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.11136007.svg)](https://doi.org/10.5281/zenodo.11136007)\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n\n\n**EvoRBF** is a Python library that implements a framework \nfor training Radial Basis Function (RBF) networks using `Intelligence Nature-inspired Algorithms (INAs)`. It provides a \ncomparable alternative to the traditional RBF network and is compatible with the Scikit-Learn library. With EvoRBF, you can \nperform searches and hyperparameter tuning using the functionalities provided by the Scikit-Learn library.\n\n| **EvoRBF**                   | **Evolving Radial Basis Function Network**                                  |\n|------------------------------|-----------------------------------------------------------------------------|\n| **Free software**            | GNU General Public License (GPL) V3 license                                 |\n| **Provided Estimator**       | RbfRegressor, RbfClassifier, InaRbfRegressor, InaRbfClassifier, InaRbfTuner |\n| **Provided ML models**       | \\> 400 Models                                                               |\n| **Supported metrics**        | \\>= 67 (47 regressions and 20 classifications)                              |\n| **Supported loss functions** | \\>= 61 (45 regressions and 16 classifications)                              |\n| **Documentation**            | https://evorbf.readthedocs.io                                               | \n| **Python versions**          | \\>= 3.8.x                                                                   |  \n| **Dependencies**             | numpy, scipy, scikit-learn, pandas, mealpy, permetrics                      |\n\n\n# Citation Request \n\nIf you want to understand how Intelligence Nature-inspired Algorithms is applied to Radial Basis Function Network, you \nneed to read the paper titled \"Application of artificial intelligence in estimating mining capital expenditure using radial basis function neural network optimized by metaheuristic algorithms\". \nThe paper can be accessed at the following [this link](https://doi.org/10.1016/B978-0-443-18764-3.00015-1)\n\n\n```bibtex\n@software{thieu_2024_11136008,\n  author       = {Nguyen Van Thieu},\n  title        = {EvoRBF: Evolving Radial Basis Function Network by Intelligent Nature-inspired Algorithms},\n  month        = may,\n  year         = 2024,\n  publisher    = {Zenodo},\n  doi          = {10.5281/zenodo.11136007},\n  url          = {https://doi.org/10.5281/zenodo.11136007}\n}\n\n@article{van2023mealpy,\n  title={MEALPY: An open-source library for latest meta-heuristic algorithms in Python},\n  author={Van Thieu, Nguyen and Mirjalili, Seyedali},\n  journal={Journal of Systems Architecture},\n  year={2023},\n  publisher={Elsevier},\n  doi={10.1016/j.sysarc.2023.102871}\n}\n```\n\n\n# Usage\n\n* Install the [current PyPI release](https://pypi.python.org/pypi/evorbf):\n```sh \n$ pip install evorbf\n```\n\nAfter installation, you can check EvoRBF version:\n\n```sh\n$ python\n>>> import evorbf\n>>> evorbf.__version__\n```\n\nIn this example below, we will use Whale Optimization Algorithm to optimize the `sigmas` (in non-linear Gaussian \nkernel) and `weights` (of hidden-output layer) in RBF network (WOA-RBF model) for Diabetes prediction problem.\n\n```python\nimport numpy as np\nfrom evorbf import Data, InaRbfRegressor\nfrom sklearn.datasets import load_diabetes\n\n## Load data object\n# total samples = 442, total features = 10\nX, y = load_diabetes(return_X_y=True)\ndata = Data(X, y)\n\n## Split train and test\ndata.split_train_test(test_size=0.2, random_state=2)\nprint(data.X_train.shape, data.X_test.shape)\n\n## Scaling dataset\ndata.X_train, scaler_X = data.scale(data.X_train, scaling_methods=(\"standard\"))\ndata.X_test = scaler_X.transform(data.X_test)\n\ndata.y_train, scaler_y = data.scale(data.y_train, scaling_methods=(\"standard\", ))\ndata.y_test = scaler_y.transform(np.reshape(data.y_test, (-1, 1)))\n\n## Create model\nopt_paras = {\"name\": \"WOA\", \"epoch\": 500, \"pop_size\": 20}\nmodel = InaRbfRegressor(size_hidden=25, center_finder=\"kmean\", regularization=False, lamda=0.5, obj_name=\"MSE\",\n                        optimizer=\"BaseGA\", optimizer_paras=opt_paras, verbose=True, seed=42)\n\n## Train the model\nmodel.fit(data.X_train, data.y_train, lb=-1., ub=2.)\n\n## Test the model\ny_pred = model.predict(data.X_test)\n\nprint(model.optimizer.g_best.solution)\n## Calculate some metrics\nprint(model.score(X=data.X_test, y=data.y_test, method=\"RMSE\"))\nprint(model.scores(X=data.X_test, y=data.y_test, list_methods=[\"R2\", \"R\", \"KGE\", \"MAPE\"]))\nprint(model.evaluate(y_true=data.y_test, y_pred=y_pred, list_metrics=[\"MSE\", \"RMSE\", \"R2S\", \"NSE\", \"KGE\", \"MAPE\"]))\n```\n\nPlease go check out the [examples](/examples) folder. You'll be surprised by what this library can do for your problem.\nYou can also read the [documentation](https://evorbf.readthedocs.io/) for more detailed installation \ninstructions, explanations, and examples.\n\n\n### Official Links (Get support for questions and answers)\n\n* [Official source code repository](https://github.com/thieu1995/evorbf)\n* [Official document](https://evorbf.readthedocs.io/)\n* [Download releases](https://pypi.org/project/evorbf/) \n* [Issue tracker](https://github.com/thieu1995/evorbf/issues) \n* [Notable changes log](/ChangeLog.md)\n* [Official discussion group](https://t.me/+fRVCJGuGJg1mNDg1)\n",
    "bugtrack_url": null,
    "license": "GPLv3",
    "summary": "EvoRBF: Evolving Radial Basis Function Network by Intelligent Nature-inspired Algorithms",
    "version": "1.0.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/thieu1995/evorbf/issues",
        "Change Log": "https://github.com/thieu1995/evorbf/blob/master/ChangeLog.md",
        "Documentation": "https://evorbf.readthedocs.io/",
        "Forum": "https://t.me/+fRVCJGuGJg1mNDg1",
        "Homepage": "https://github.com/thieu1995/evorbf",
        "Source Code": "https://github.com/thieu1995/evorbf"
    },
    "split_keywords": [
        "radial basis function",
        " machine learning",
        " artificial intelligence",
        " deep learning",
        " neural networks",
        " single hidden layer network",
        " metaheuristic-based rbfrandom projection",
        " kernel methods",
        " feature extraction",
        " classification",
        " regression",
        " supervised learning",
        " optimization algorithms",
        " kernel rbf",
        " cross-validationgenetic algorithm (ga)",
        " particle swarm optimization (pso)",
        " ant colony optimization (aco)",
        " differential evolution (de)",
        " simulated annealing",
        " grey wolf optimizer (gwo)",
        " whale optimization algorithm (woa)",
        " confusion matrix",
        " recall",
        " precision",
        " accuracy",
        " k-nearest neighbors",
        " random forest",
        " support vector machine",
        " scikit-learn models",
        " estimator",
        " robust machine learning",
        " shallow neural network",
        " nature-inspired rbf",
        " rbf network",
        " convergence analysis",
        " search space exploration",
        " local search",
        " computational intelligence",
        " robust optimization",
        " performance analysis",
        " intelligent optimization",
        " simulations"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c2f81c7b102c98ead794b5f819e8e1b36b27e5203789b8be8149fe9e35a69762",
                "md5": "33e16fa2aaf6074cd3ab3ddac83aa870",
                "sha256": "86d11b9c4dfb6328fe8d4f9e1651a84138aa154e6e63f53bd65fbaddd0488de2"
            },
            "downloads": -1,
            "filename": "evorbf-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "33e16fa2aaf6074cd3ab3ddac83aa870",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 37152,
            "upload_time": "2024-05-11T07:32:33",
            "upload_time_iso_8601": "2024-05-11T07:32:33.629305Z",
            "url": "https://files.pythonhosted.org/packages/c2/f8/1c7b102c98ead794b5f819e8e1b36b27e5203789b8be8149fe9e35a69762/evorbf-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ec22760e70f2786d9e67a0c90be579716c1ca670ed7b17cc061c970654d3cccd",
                "md5": "e31a6ec4a7a710b002774383aa77ada0",
                "sha256": "50a94c29b23d97e900ad4a5f4b7f6a5f4211f8618ea27f33efa894d12767b682"
            },
            "downloads": -1,
            "filename": "evorbf-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "e31a6ec4a7a710b002774383aa77ada0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 36042,
            "upload_time": "2024-05-11T07:32:35",
            "upload_time_iso_8601": "2024-05-11T07:32:35.523462Z",
            "url": "https://files.pythonhosted.org/packages/ec/22/760e70f2786d9e67a0c90be579716c1ca670ed7b17cc061c970654d3cccd/evorbf-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-11 07:32:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "thieu1995",
    "github_project": "evorbf",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "numpy",
            "specs": [
                [
                    ">=",
                    "1.17.1"
                ]
            ]
        },
        {
            "name": "scipy",
            "specs": [
                [
                    ">=",
                    "1.7.1"
                ]
            ]
        },
        {
            "name": "scikit-learn",
            "specs": [
                [
                    ">=",
                    "1.0.2"
                ]
            ]
        },
        {
            "name": "pandas",
            "specs": [
                [
                    ">=",
                    "1.3.5"
                ]
            ]
        },
        {
            "name": "mealpy",
            "specs": [
                [
                    ">=",
                    "3.0.1"
                ]
            ]
        },
        {
            "name": "permetrics",
            "specs": [
                [
                    ">=",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    "==",
                    "7.1.2"
                ]
            ]
        },
        {
            "name": "pytest-cov",
            "specs": [
                [
                    "==",
                    "4.0.0"
                ]
            ]
        },
        {
            "name": "flake8",
            "specs": [
                [
                    ">=",
                    "4.0.1"
                ]
            ]
        }
    ],
    "lcname": "evorbf"
}
        
Elapsed time: 0.30499s