{"id":21186480,"url":"https://github.com/thieu1995/graforvfl","last_synced_at":"2025-10-20T12:50:58.781Z","repository":{"id":210804062,"uuid":"676073243","full_name":"thieu1995/GrafoRVFL","owner":"thieu1995","description":"GrafoRVFL: A Gradient-Free Optimization Framework for Boosting Random Vector Functional Link Network","archived":false,"fork":false,"pushed_at":"2024-11-10T17:27:08.000Z","size":129,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-10T17:28:44.561Z","etag":null,"topics":["artificial-intelligence","evolutionary-computing","genetic-algorithm","global-search","gradient-free-based-rvfl","machine-learning","mealpy","metaheuristic-algorithm","metaheuristics","nature-inspired-algorithms","neural-network","optimization-algorithms","particle-swarm-optimization","random-vector-functional-link-neural-network","rvfl-networks","swarm-based-intelligence","whale-optimization-algorithm"],"latest_commit_sha":null,"homepage":"https://graforvfl.readthedocs.org","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thieu1995.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-08T11:23:30.000Z","updated_at":"2024-11-10T17:27:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"a47861a9-ef79-481f-ab0c-9047a3267e13","html_url":"https://github.com/thieu1995/GrafoRVFL","commit_stats":null,"previous_names":["thieu1995/graforvfl"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thieu1995%2FGrafoRVFL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thieu1995%2FGrafoRVFL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thieu1995%2FGrafoRVFL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thieu1995%2FGrafoRVFL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thieu1995","download_url":"https://codeload.github.com/thieu1995/GrafoRVFL/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225608368,"owners_count":17495899,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artificial-intelligence","evolutionary-computing","genetic-algorithm","global-search","gradient-free-based-rvfl","machine-learning","mealpy","metaheuristic-algorithm","metaheuristics","nature-inspired-algorithms","neural-network","optimization-algorithms","particle-swarm-optimization","random-vector-functional-link-neural-network","rvfl-networks","swarm-based-intelligence","whale-optimization-algorithm"],"created_at":"2024-11-20T18:23:55.913Z","updated_at":"2025-10-20T12:50:53.737Z","avatar_url":"https://github.com/thieu1995.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# GrafoRVFL (GRAdient Free Optimized Random Vector Functional Link)\n\n---\n\n[![GitHub release](https://img.shields.io/badge/release-2.2.0-yellow.svg)](https://github.com/thieu1995/GrafoRVFL/releases)\n[![Wheel](https://img.shields.io/pypi/wheel/gensim.svg)](https://pypi.python.org/pypi/graforvfl) \n[![PyPI version](https://badge.fury.io/py/graforvfl.svg)](https://badge.fury.io/py/graforvfl)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/graforvfl.svg)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/graforvfl.svg)\n[![Downloads](https://pepy.tech/badge/graforvfl)](https://pepy.tech/project/graforvfl)\n[![Tests \u0026 Publishes to PyPI](https://github.com/thieu1995/graforvfl/actions/workflows/publish-package.yml/badge.svg)](https://github.com/thieu1995/graforvfl/actions/workflows/publish-package.yml)\n[![Documentation Status](https://readthedocs.org/projects/graforvfl/badge/?version=latest)](https://graforvfl.readthedocs.io/en/latest/?badge=latest)\n[![Chat](https://img.shields.io/badge/Chat-on%20Telegram-blue)](https://t.me/+fRVCJGuGJg1mNDg1)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10258280.svg)](https://doi.org/10.5281/zenodo.10258280)\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n\n\n## 📑 Overview\n\n**GrafoRVFL** is an open-source Python library designed to optimize Random Vector Functional Link (RVFL) networks using \nvarious **gradient-free metaheuristic algorithms** such as GA, PSO, WOA, TLO, DE, etc. It is fully implemented in \n**NumPy** and seamlessly integrates with the **Scikit-Learn** interface, making it easy to plug into standard \nML workflows. GrafoRVFL enables hyperparameter tuning for RVFL networks without relying on gradient-based methods.\n\n\n## ✨ Features\n\n- ✅ Free software under **GNU GPL v3**\n- 📘 Full documentation: [https://graforvfl.readthedocs.io](https://graforvfl.readthedocs.io)\n- 🧠 Estimators:\n  - `RvflRegressor`\n  - `RvflClassifier`\n  - `GfoRvflCV`\n  - `GfoRvflTuner`\n  - `GfoRvflComparator`\n- 🐍 Python compatibility: `\u003e= 3.8`\n- 🧩 Dependencies:\n  - `numpy`, `scipy`, `scikit-learn`, `pandas`, `mealpy`, `permetrics`, `matplotlib`\n\n\n## 📖 Citation Request \n\nPlease include these citations if you plan to use this library:\n\n```bibtex\n@software{nguyen_van_thieu_2023_10258280,\n  author       = {Nguyen Van Thieu},\n  title        = {GrafoRVFL: A Gradient-Free Optimization Framework for Boosting Random Vector Functional Link Network},\n  month        = June,\n  year         = 2025,\n  publisher    = {Zenodo},\n  doi          = {10.5281/zenodo.10258280},\n  url          = {https://github.com/thieu1995/GrafoRVFL}\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@inproceedings{nguyen2019building,\n  title={Building resource auto-scaler with functional-link neural network and adaptive bacterial foraging optimization},\n  author={Nguyen, Thieu and Nguyen, Binh Minh and Nguyen, Giang},\n  booktitle={International Conference on Theory and Applications of Models of Computation},\n  pages={501--517},\n  year={2019},\n  organization={Springer}\n}\n\n@inproceedings{nguyen2018resource,\n  title={A resource usage prediction system using functional-link and genetic algorithm neural network for multivariate cloud metrics},\n  author={Nguyen, Thieu and Tran, Nhuan and Nguyen, Binh Minh and Nguyen, Giang},\n  booktitle={2018 IEEE 11th conference on service-oriented computing and applications (SOCA)},\n  pages={49--56},\n  year={2018},\n  organization={IEEE},\n  doi={10.1109/SOCA.2018.00014}\n}\n```\n\n* Learn more about Random Vector Functional Link from [this paper](https://doi.org/10.1016/j.ins.2015.09.025)\n\n* Learn more about on how to use Gradient Free Optimization to fine-tune the hyper-parameter of RVFL networks from \n[this paper](https://doi.org/10.1016/j.neucom.2018.07.080)\n\n\n## 🔧 Installation\n\nInstall the latest version from PyPI:\n\n```bash\n$ pip install graforvfl\n```\n\nVerify installation:\n\n```bash\n$ python\n\u003e\u003e\u003e import graforvfl\n\u003e\u003e\u003e graforvfl.__version__\n```\n\n## 🧪 Example Usage\n\nBelow is a simple example code of how to use Gradient Free Optimization to tune hyper-parameter of RVFL network.\n\n```python\nfrom sklearn.datasets import load_breast_cancer\nfrom graforvfl import Data, GfoRvflCV, StringVar, IntegerVar, FloatVar\n\n\n## Load data object\nX, y = load_breast_cancer(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, inplace=True)\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\", \"minmax\"))\ndata.X_test = scaler_X.transform(data.X_test)\n\ndata.y_train, scaler_y = data.encode_label(data.y_train)\ndata.y_test = scaler_y.transform(data.y_test)\n\n# Design the boundary (parameters)\nmy_bounds = [\n    IntegerVar(lb=3, ub=50, name=\"size_hidden\"),\n    StringVar(valid_sets=(\"none\", \"relu\", \"leaky_relu\", \"celu\", \"prelu\", \"gelu\", \"elu\",\n                          \"selu\", \"rrelu\", \"tanh\", \"hard_tanh\", \"sigmoid\", \"hard_sigmoid\",\n                          \"log_sigmoid\", \"silu\", \"swish\", \"hard_swish\", \"soft_plus\", \"mish\",\n                          \"soft_sign\", \"tanh_shrink\", \"soft_shrink\", \"hard_shrink\",\n                          \"softmin\", \"softmax\", \"log_softmax\"), name=\"act_name\"),\n    StringVar(valid_sets=(\"orthogonal\", \"he_uniform\", \"he_normal\", \"glorot_uniform\",\n                          \"glorot_normal\", \"lecun_uniform\", \"lecun_normal\", \"random_uniform\",\n                          \"random_normal\"), name=\"weight_initializer\"),\n    FloatVar(lb=0, ub=10., name=\"reg_alpha\"),\n]\n\nmodel = GfoRvflCV(problem_type=\"classification\", bounds=my_bounds,\n                  optim=\"OriginalWOA\", optim_params={\"name\": \"WOA\", \"epoch\": 10, \"pop_size\": 20},\n                  scoring=\"AS\", cv=3, seed=42, verbose=True)\nmodel.fit(data.X_train, data.y_train)\nprint(model.best_params)\nprint(model.best_estimator)\nprint(model.best_estimator.scores(data.X_test, data.y_test, list_metrics=(\"PS\", \"RS\", \"NPV\", \"F1S\", \"F2S\")))\n```\n\n👉 The more complicated cases in the folder: [examples](/examples). You can also read the [documentation](https://graforvfl.readthedocs.io/) \nfor more detailed installation instructions, explanations, and examples.\n\n\n## 📎 Official channels \n\n* 🔗 [Official source code repository](https://github.com/thieu1995/GrafoRVFL)\n* 📘 [Official document](https://graforvfl.readthedocs.io/)\n* 📦 [Download releases](https://pypi.org/project/graforvfl/) \n* 🐞 [Issue tracker](https://github.com/thieu1995/GrafoRVFL/issues) \n* 📝 [Notable changes log](/ChangeLog.md)\n* 💬 [Official discussion group](https://t.me/+fRVCJGuGJg1mNDg1)\n\n---\n\nDeveloped by: [Thieu](mailto:nguyenthieu2102@gmail.com?Subject=GrafoRVFL_QUESTIONS) @ 2025\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthieu1995%2Fgraforvfl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthieu1995%2Fgraforvfl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthieu1995%2Fgraforvfl/lists"}