graforvfl

GrafoRVFL: A Gradient-Free Optimization Framework for Boosting Random Vector Functional Link Network

https://github.com/thieu1995/graforvfl

Science Score: 49.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 10 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.8%) to scientific vocabulary

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
Last synced: 6 months ago · JSON representation

Repository

GrafoRVFL: A Gradient-Free Optimization Framework for Boosting Random Vector Functional Link Network

Basic Info
Statistics
  • Stars: 6
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
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
Created over 2 years ago · Last pushed 8 months ago
Metadata Files
Readme Changelog License Code of conduct Citation

README.md

GrafoRVFL (GRAdient Free Optimized Random Vector Functional Link)


GitHub release Wheel PyPI version PyPI - Python Version PyPI - Downloads Downloads Tests & Publishes to PyPI Documentation Status Chat DOI License: GPL v3

Overview

GrafoRVFL is an open-source Python library designed to optimize Random Vector Functional Link (RVFL) networks using various gradient-free metaheuristic algorithms such as GA, PSO, WOA, TLO, DE, etc. It is fully implemented in NumPy and seamlessly integrates with the Scikit-Learn interface, making it easy to plug into standard ML workflows. GrafoRVFL enables hyperparameter tuning for RVFL networks without relying on gradient-based methods.

Features

  • Free software under GNU GPL v3
  • Full documentation: https://graforvfl.readthedocs.io
  • Estimators:
    • RvflRegressor
    • RvflClassifier
    • GfoRvflCV
    • GfoRvflTuner
    • GfoRvflComparator
  • Python compatibility: >= 3.8
  • Dependencies:
    • numpy, scipy, scikit-learn, pandas, mealpy, permetrics, matplotlib

Citation Request

Please include these citations if you plan to use this library:

```bibtex @software{nguyenvanthieu202310258280, author = {Nguyen Van Thieu}, title = {GrafoRVFL: A Gradient-Free Optimization Framework for Boosting Random Vector Functional Link Network}, month = June, year = 2025, publisher = {Zenodo}, doi = {10.5281/zenodo.10258280}, url = {https://github.com/thieu1995/GrafoRVFL} }

@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} }

@inproceedings{nguyen2019building, title={Building resource auto-scaler with functional-link neural network and adaptive bacterial foraging optimization}, author={Nguyen, Thieu and Nguyen, Binh Minh and Nguyen, Giang}, booktitle={International Conference on Theory and Applications of Models of Computation}, pages={501--517}, year={2019}, organization={Springer} }

@inproceedings{nguyen2018resource, title={A resource usage prediction system using functional-link and genetic algorithm neural network for multivariate cloud metrics}, author={Nguyen, Thieu and Tran, Nhuan and Nguyen, Binh Minh and Nguyen, Giang}, booktitle={2018 IEEE 11th conference on service-oriented computing and applications (SOCA)}, pages={49--56}, year={2018}, organization={IEEE}, doi={10.1109/SOCA.2018.00014} } ```

  • Learn more about Random Vector Functional Link from this paper

  • Learn more about on how to use Gradient Free Optimization to fine-tune the hyper-parameter of RVFL networks from this paper

Installation

Install the latest version from PyPI:

bash $ pip install graforvfl

Verify installation:

```bash $ python

import graforvfl graforvfl.version ```

Example Usage

Below is a simple example code of how to use Gradient Free Optimization to tune hyper-parameter of RVFL network.

```python from sklearn.datasets import loadbreastcancer from graforvfl import Data, GfoRvflCV, StringVar, IntegerVar, FloatVar

Load data object

X, y = loadbreastcancer(returnXy=True) data = Data(X, y)

Split train and test

data.splittraintest(testsize=0.2, randomstate=2, inplace=True) print(data.Xtrain.shape, data.Xtest.shape)

Scaling dataset

data.Xtrain, scalerX = data.scale(data.Xtrain, scalingmethods=("standard", "minmax")) data.Xtest = scalerX.transform(data.X_test)

data.ytrain, scalery = data.encodelabel(data.ytrain) data.ytest = scalery.transform(data.y_test)

Design the boundary (parameters)

mybounds = [ IntegerVar(lb=3, ub=50, name="sizehidden"), StringVar(validsets=("none", "relu", "leakyrelu", "celu", "prelu", "gelu", "elu", "selu", "rrelu", "tanh", "hardtanh", "sigmoid", "hardsigmoid", "logsigmoid", "silu", "swish", "hardswish", "softplus", "mish", "softsign", "tanhshrink", "softshrink", "hardshrink", "softmin", "softmax", "logsoftmax"), name="actname"), StringVar(validsets=("orthogonal", "heuniform", "henormal", "glorotuniform", "glorotnormal", "lecununiform", "lecunnormal", "randomuniform", "randomnormal"), name="weightinitializer"), FloatVar(lb=0, ub=10., name="regalpha"), ]

model = GfoRvflCV(problemtype="classification", bounds=mybounds, optim="OriginalWOA", optimparams={"name": "WOA", "epoch": 10, "popsize": 20}, scoring="AS", cv=3, seed=42, verbose=True) model.fit(data.Xtrain, data.ytrain) print(model.bestparams) print(model.bestestimator) print(model.bestestimator.scores(data.Xtest, data.ytest, listmetrics=("PS", "RS", "NPV", "F1S", "F2S"))) ```

The more complicated cases in the folder: examples. You can also read the documentation for more detailed installation instructions, explanations, and examples.

Official channels


Developed by: Thieu @ 2025

Owner

  • Name: Nguyen Van Thieu
  • Login: thieu1995
  • Kind: user
  • Location: Earth
  • Company: AIIR Group

Knowledge is power, sharing it is the premise of progress in life. It seems like a burden to someone, but it is the only way to achieve immortality.

GitHub Events

Total
  • Create event: 2
  • Issues event: 1
  • Release event: 2
  • Issue comment event: 1
  • Member event: 1
  • Push event: 33
Last Year
  • Create event: 2
  • Issues event: 1
  • Release event: 2
  • Issue comment event: 1
  • Member event: 1
  • Push event: 33

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 1
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • tylerjereddy (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 240 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 7
  • Total maintainers: 1
pypi.org: graforvfl

GrafoRVFL: A Gradient-Free Optimization Framework for Boosting Random Vector Functional Link Network

  • Versions: 7
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 240 Last month
Rankings
Dependent packages count: 10.1%
Average: 38.7%
Dependent repos count: 67.3%
Maintainers (1)
Last synced: 8 months ago