graforvfl


Namegraforvfl JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/thieu1995/GrafoRVFL
SummaryGrafoRVFL: A Python Library for Maximizing Performance of Random Vector Functional Link Network with Gradient-Free Optimization
upload_time2023-12-05 02:16:19
maintainer
docs_urlNone
authorThieu
requires_python>=3.8
licenseGPLv3
keywords random vector functional link machine learning artificial intelligence deep learning neural networks single hidden layer network random projection rvfl feed-forward neural network artificial neural network classification regression supervised learning online learning generalization optimization algorithms kernel rvfl 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 pearson correlation coefficient (pcc) spearman correlation coefficient (scc) global optimization convergence analysis search space exploration local search computational intelligence robust optimization metaheuristic metaheuristic algorithms nature-inspired computing nature-inspired algorithms swarm-based computation metaheuristic-based rvfl gradient-free optimizationgradient-free optimized rvfl metaheuristic-optimized rvfl performance analysis intelligent optimization simulations
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# GrafoRVFL (GRAdient Free Optimized Random Vector Functional Link)

---

[![GitHub release](https://img.shields.io/badge/release-1.0.0-yellow.svg)](https://github.com/thieu1995/GrafoRVFL/releases)
[![Wheel](https://img.shields.io/pypi/wheel/gensim.svg)](https://pypi.python.org/pypi/graforvfl) 
[![PyPI version](https://badge.fury.io/py/graforvfl.svg)](https://badge.fury.io/py/graforvfl)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/graforvfl.svg)
![PyPI - Status](https://img.shields.io/pypi/status/graforvfl.svg)
![PyPI - Downloads](https://img.shields.io/pypi/dm/graforvfl.svg)
[![Downloads](https://pepy.tech/badge/graforvfl)](https://pepy.tech/project/graforvfl)
[![Tests & Publishes to PyPI](https://github.com/thieu1995/graforvfl/actions/workflows/publish-package.yaml/badge.svg)](https://github.com/thieu1995/graforvfl/actions/workflows/publish-package.yaml)
![GitHub Release Date](https://img.shields.io/github/release-date/thieu1995/graforvfl.svg)
[![Documentation Status](https://readthedocs.org/projects/graforvfl/badge/?version=latest)](https://graforvfl.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/graforvfl.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.10258280.svg)](https://doi.org/10.5281/zenodo.10258280)
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)


GrafoRVFL is an open-source library in Python that employs gradient-free optimization ((GA, PSO, WOA, TLO, DE, ...) to 
optimize Random Vector Functional Link Networks. It is entirely implemented based on Numpy and fully compatible 
with the interfaces of the Scikit-Learn library. With GrafoRVFL, you can fine-tune the hyper-parameters of network 
or optimize weights in the network using gradient-free optimizers.


* **Free software:** GNU General Public License (GPL) V3 license
* **Provided Estimator**: RvflRegressor, RvflClassifier, MhaTuneRvfl
* **Total Gradient Free based RVFL Regressor**: > 200 Models 
* **Total Gradient Free based RVFL Classifier**: > 200 Models
* **Supported performance metrics**: >= 67 (47 regressions and 20 classifications)
* **Supported objective functions (as fitness functions or loss functions)**: >= 67 (47 regressions and 20 classifications)
* **Documentation:** https://graforvfl.readthedocs.io
* **Python versions:** >= 3.8.x
* **Dependencies:** numpy, scipy, scikit-learn, pandas, mealpy, permetrics


# Citation Request 

* Learn more about Random Vector Functional Link from [this paper](https://doi.org/10.1016/j.ins.2015.09.025)

* Learn more about on how to use Gradient Free Optimization to fine-tune the hyper-parameter of RVFL networks from 
[this paper](https://doi.org/10.1109/TCSS.2022.3146974)

* Learn more about on how to use Gradient Free Optimization to optimize the weights of RVFL netweorks from [this paper](https://doi.org/10.1109/SOCA.2018.00014)



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

```code

@software{nguyen_van_thieu_2023_10258280,
  author       = {Nguyen Van Thieu},
  title        = {GrafoRVFL: A Python Library for Maximizing Performance of Random Vector Functional Link Network with Gradient-Free Optimization},
  month        = dec,
  year         = 2023,
  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}
}


```

# Installation

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

* Install directly from source code
```sh 
$ git clone https://github.com/thieu1995/GrafoRVFL.git
$ cd GrafoRVFL
$ python setup.py install
```

* In case, you want to install the development version from Github:
```sh 
$ pip install git+https://github.com/thieu1995/GrafoRVFL 
```

After installation, you can import GrafoRVFL as any other Python module:

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

### Examples

Please check all use cases and examples in folder [examples](examples).

Current provided classes:

```python
from graforvfl import DataTransformer, Data
from graforvfl import RvflRegressor, RvflClassifier, MhaTuneRvfl
```

##### `DataTransformer` class

We provide many scaler classes that you can select and make a combination of transforming your data via 
DataTransformer class. For example: scale data by `Loge` and then `Sqrt` and then `MinMax`:

```python
from graforvfl import DataTransformer
import pandas as pd
from sklearn.model_selection import train_test_split

dataset = pd.read_csv('Position_Salaries.csv')
X = dataset.iloc[:, 1:5].values
y = dataset.iloc[:, 5].values
X_train, y_train, X_test, y_test = train_test_split(X, y, test_size=0.2)

dt = DataTransformer(scaling_methods=("loge", "sqrt", "minmax"))
X_train_scaled = dt.fit_transform(X_train)
X_test_scaled = dt.transform(X_test)
```

##### `Data` class

+ You can load your dataset into Data class
+ You can split dataset to train and test set
+ You can scale dataset without using DataTransformer class
+ You can scale labels using LabelEncoder

```python
from graforvfl import Data
import pandas as pd

dataset = pd.read_csv('Position_Salaries.csv')
X = dataset.iloc[:, 1:5].values
y = dataset.iloc[:, 5].values

data = Data(X, y, name="position_salaries")

#### Split dataset into train and test set
data.split_train_test(test_size=0.2, shuffle=True, random_state=100, inplace=True)

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

data.y_train, scaler_y = data.encode_label(data.y_train)  # This is for classification problem only
data.y_test = scaler_y.transform(data.y_test)
```

##### `Neural Network` class

```python
from graforvfl import RvflRegressor, RvflClassifier, MhaTuneRvfl
from mealpy import IntegerVar, StringVar

## 1. Use standard RVFL model for regression problem
model = RvflRegressor(size_hidden=10, act_name='sigmoid', weight_initializer="random_uniform", trainer="OLS", alpha=0.5)

## 2. Use standard RVFL model for classification problem 
model = RvflClassifier(size_hidden=10, act_name='sigmoid', weight_initializer="random_normal", trainer="OLS", alpha=0.5)


## 3. Use Gradient Free Optimization to fine-tune the hyper-parameter of RVFL network for regression problem
# Design the boundary (parameters)
my_bounds = [
    IntegerVar(lb=2, ub=1000, name="size_hidden"),
    StringVar(valid_sets=("none", "relu", "leaky_relu", "celu", "prelu", "gelu",
                          "elu", "selu", "rrelu", "tanh", "sigmoid"), name="act_name"),
    StringVar(valid_sets=("orthogonal", "he_uniform", "he_normal", "glorot_uniform", "glorot_normal",
                          "lecun_uniform", "lecun_normal", "random_uniform", "random_normal"), name="weight_initializer")
]
opt_paras = {"name": "WOA", "epoch": 10, "pop_size": 20}
model = MhaTuneRvfl(problem_type="regression", bounds=my_bounds, cv=3, scoring="MSE",
                      optimizer="OriginalWOA", optimizer_paras=opt_paras, verbose=True)
```

##### Supported functions in `model` object

```python
from graforvfl import RvflRegressor, Data 

data = Data()       # Assumption that you have provided this object like above

model = RvflRegressor(size_hidden=10, act_name='sigmoid', weight_initializer="random_uniform", trainer="OLS", alpha=0.5)

## Train the model
model.fit(data.X_train, data.y_train)

## Predicting a new result
y_pred = model.predict(data.X_test)

## Calculate metrics using score or scores functions.
print(model.score(data.X_test, data.y_test, method="MAE"))
print(model.scores(data.X_test, data.y_test, list_methods=["MAPE", "NNSE", "KGE", "MASE", "R2", "R", "R2S"]))

## Calculate metrics using evaluate function
print(model.evaluate(data.y_test, y_pred, list_metrics=("MSE", "RMSE", "MAPE", "NSE")))

## Save performance metrics to csv file
model.save_metrics(data.y_test, y_pred, list_metrics=("RMSE", "MAE"), save_path="history", filename="metrics.csv")

## Save training loss to csv file
model.save_loss_train(save_path="history", filename="loss.csv")

## Save predicted label
model.save_y_predicted(X=data.X_test, y_true=data.y_test, save_path="history", filename="y_predicted.csv")

## Save model
model.save_model(save_path="history", filename="traditional_mlp.pkl")

## Load model 
trained_model = RvflRegressor.load_model(load_path="history", filename="traditional_mlp.pkl")
```

# Support (questions, problems)

### Official Links 

* Official source code repo: https://github.com/thieu1995/GrafoRVFL
* Official document: https://graforvfl.readthedocs.io/
* Download releases: https://pypi.org/project/graforvfl/
* Issue tracker: https://github.com/thieu1995/GrafoRVFL/issues
* Notable changes log: https://github.com/thieu1995/GrafoRVFL/blob/main/ChangeLog.md
* Official chat group: https://t.me/+fRVCJGuGJg1mNDg1

* This project also related to our another projects which are "optimization" and "machine learning", check it here:
    * https://github.com/thieu1995/mealpy
    * https://github.com/thieu1995/metaheuristics
    * https://github.com/thieu1995/opfunu
    * https://github.com/thieu1995/enoppy
    * https://github.com/thieu1995/permetrics
    * https://github.com/thieu1995/MetaCluster
    * https://github.com/thieu1995/pfevaluator
    * https://github.com/thieu1995/IntelELM
    * https://github.com/thieu1995/reflame
    * https://github.com/thieu1995/MetaPerceptron
    * https://github.com/aiir-team

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/thieu1995/GrafoRVFL",
    "name": "graforvfl",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "random vector functional link,machine learning,artificial intelligence,deep learning,neural networks,single hidden layer network,random projection,RVFL,feed-forward neural network,artificial neural network,classification,regression,supervised learning,online learning,generalization,optimization algorithms,Kernel RVFL,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,pearson correlation coefficient (PCC),spearman correlation coefficient (SCC),Global optimization,Convergence analysis,Search space exploration,Local search,Computational intelligence,Robust optimization,metaheuristic,metaheuristic algorithms,nature-inspired computing,nature-inspired algorithms,swarm-based computation,metaheuristic-based RVFL,gradient-free optimizationgradient-free optimized RVFL,metaheuristic-optimized RVFL,Performance analysis,Intelligent optimization,Simulations",
    "author": "Thieu",
    "author_email": "nguyenthieu2102@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/39/a0/0b8debdcfcbf510e0ad8307cdb459b9047909c8c080357526fffea5e1eda/graforvfl-1.0.0.tar.gz",
    "platform": null,
    "description": "\n# GrafoRVFL (GRAdient Free Optimized Random Vector Functional Link)\n\n---\n\n[![GitHub release](https://img.shields.io/badge/release-1.0.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 - Status](https://img.shields.io/pypi/status/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 & Publishes to PyPI](https://github.com/thieu1995/graforvfl/actions/workflows/publish-package.yaml/badge.svg)](https://github.com/thieu1995/graforvfl/actions/workflows/publish-package.yaml)\n![GitHub Release Date](https://img.shields.io/github/release-date/thieu1995/graforvfl.svg)\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![GitHub contributors](https://img.shields.io/github/contributors/thieu1995/graforvfl.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.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\nGrafoRVFL is an open-source library in Python that employs gradient-free optimization ((GA, PSO, WOA, TLO, DE, ...) to \noptimize Random Vector Functional Link Networks. It is entirely implemented based on Numpy and fully compatible \nwith the interfaces of the Scikit-Learn library. With GrafoRVFL, you can fine-tune the hyper-parameters of network \nor optimize weights in the network using gradient-free optimizers.\n\n\n* **Free software:** GNU General Public License (GPL) V3 license\n* **Provided Estimator**: RvflRegressor, RvflClassifier, MhaTuneRvfl\n* **Total Gradient Free based RVFL Regressor**: > 200 Models \n* **Total Gradient Free based RVFL Classifier**: > 200 Models\n* **Supported performance metrics**: >= 67 (47 regressions and 20 classifications)\n* **Supported objective functions (as fitness functions or loss functions)**: >= 67 (47 regressions and 20 classifications)\n* **Documentation:** https://graforvfl.readthedocs.io\n* **Python versions:** >= 3.8.x\n* **Dependencies:** numpy, scipy, scikit-learn, pandas, mealpy, permetrics\n\n\n# Citation Request \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.1109/TCSS.2022.3146974)\n\n* Learn more about on how to use Gradient Free Optimization to optimize the weights of RVFL netweorks from [this paper](https://doi.org/10.1109/SOCA.2018.00014)\n\n\n\nPlease include these citations if you plan to use this library:\n\n```code\n\n@software{nguyen_van_thieu_2023_10258280,\n  author       = {Nguyen Van Thieu},\n  title        = {GrafoRVFL: A Python Library for Maximizing Performance of Random Vector Functional Link Network with Gradient-Free Optimization},\n  month        = dec,\n  year         = 2023,\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```\n\n# Installation\n\n* Install the [current PyPI release](https://pypi.python.org/pypi/graforvfl):\n```sh \n$ pip install graforvfl==1.0.0\n```\n\n* Install directly from source code\n```sh \n$ git clone https://github.com/thieu1995/GrafoRVFL.git\n$ cd GrafoRVFL\n$ python setup.py install\n```\n\n* In case, you want to install the development version from Github:\n```sh \n$ pip install git+https://github.com/thieu1995/GrafoRVFL \n```\n\nAfter installation, you can import GrafoRVFL as any other Python module:\n\n```sh\n$ python\n>>> import graforvfl\n>>> graforvfl.__version__\n```\n\n### Examples\n\nPlease check all use cases and examples in folder [examples](examples).\n\nCurrent provided classes:\n\n```python\nfrom graforvfl import DataTransformer, Data\nfrom graforvfl import RvflRegressor, RvflClassifier, MhaTuneRvfl\n```\n\n##### `DataTransformer` class\n\nWe provide many scaler classes that you can select and make a combination of transforming your data via \nDataTransformer class. For example: scale data by `Loge` and then `Sqrt` and then `MinMax`:\n\n```python\nfrom graforvfl import DataTransformer\nimport pandas as pd\nfrom sklearn.model_selection import train_test_split\n\ndataset = pd.read_csv('Position_Salaries.csv')\nX = dataset.iloc[:, 1:5].values\ny = dataset.iloc[:, 5].values\nX_train, y_train, X_test, y_test = train_test_split(X, y, test_size=0.2)\n\ndt = DataTransformer(scaling_methods=(\"loge\", \"sqrt\", \"minmax\"))\nX_train_scaled = dt.fit_transform(X_train)\nX_test_scaled = dt.transform(X_test)\n```\n\n##### `Data` class\n\n+ You can load your dataset into Data class\n+ You can split dataset to train and test set\n+ You can scale dataset without using DataTransformer class\n+ You can scale labels using LabelEncoder\n\n```python\nfrom graforvfl import Data\nimport pandas as pd\n\ndataset = pd.read_csv('Position_Salaries.csv')\nX = dataset.iloc[:, 1:5].values\ny = dataset.iloc[:, 5].values\n\ndata = Data(X, y, name=\"position_salaries\")\n\n#### Split dataset into train and test set\ndata.split_train_test(test_size=0.2, shuffle=True, random_state=100, inplace=True)\n\n#### Feature Scaling\ndata.X_train, scaler_X = data.scale(data.X_train, scaling_methods=(\"standard\", \"sqrt\", \"minmax\"))\ndata.X_test = scaler_X.transform(data.X_test)\n\ndata.y_train, scaler_y = data.encode_label(data.y_train)  # This is for classification problem only\ndata.y_test = scaler_y.transform(data.y_test)\n```\n\n##### `Neural Network` class\n\n```python\nfrom graforvfl import RvflRegressor, RvflClassifier, MhaTuneRvfl\nfrom mealpy import IntegerVar, StringVar\n\n## 1. Use standard RVFL model for regression problem\nmodel = RvflRegressor(size_hidden=10, act_name='sigmoid', weight_initializer=\"random_uniform\", trainer=\"OLS\", alpha=0.5)\n\n## 2. Use standard RVFL model for classification problem \nmodel = RvflClassifier(size_hidden=10, act_name='sigmoid', weight_initializer=\"random_normal\", trainer=\"OLS\", alpha=0.5)\n\n\n## 3. Use Gradient Free Optimization to fine-tune the hyper-parameter of RVFL network for regression problem\n# Design the boundary (parameters)\nmy_bounds = [\n    IntegerVar(lb=2, ub=1000, name=\"size_hidden\"),\n    StringVar(valid_sets=(\"none\", \"relu\", \"leaky_relu\", \"celu\", \"prelu\", \"gelu\",\n                          \"elu\", \"selu\", \"rrelu\", \"tanh\", \"sigmoid\"), name=\"act_name\"),\n    StringVar(valid_sets=(\"orthogonal\", \"he_uniform\", \"he_normal\", \"glorot_uniform\", \"glorot_normal\",\n                          \"lecun_uniform\", \"lecun_normal\", \"random_uniform\", \"random_normal\"), name=\"weight_initializer\")\n]\nopt_paras = {\"name\": \"WOA\", \"epoch\": 10, \"pop_size\": 20}\nmodel = MhaTuneRvfl(problem_type=\"regression\", bounds=my_bounds, cv=3, scoring=\"MSE\",\n                      optimizer=\"OriginalWOA\", optimizer_paras=opt_paras, verbose=True)\n```\n\n##### Supported functions in `model` object\n\n```python\nfrom graforvfl import RvflRegressor, Data \n\ndata = Data()       # Assumption that you have provided this object like above\n\nmodel = RvflRegressor(size_hidden=10, act_name='sigmoid', weight_initializer=\"random_uniform\", trainer=\"OLS\", alpha=0.5)\n\n## Train the model\nmodel.fit(data.X_train, data.y_train)\n\n## Predicting a new result\ny_pred = model.predict(data.X_test)\n\n## Calculate metrics using score or scores functions.\nprint(model.score(data.X_test, data.y_test, method=\"MAE\"))\nprint(model.scores(data.X_test, data.y_test, list_methods=[\"MAPE\", \"NNSE\", \"KGE\", \"MASE\", \"R2\", \"R\", \"R2S\"]))\n\n## Calculate metrics using evaluate function\nprint(model.evaluate(data.y_test, y_pred, list_metrics=(\"MSE\", \"RMSE\", \"MAPE\", \"NSE\")))\n\n## Save performance metrics to csv file\nmodel.save_metrics(data.y_test, y_pred, list_metrics=(\"RMSE\", \"MAE\"), save_path=\"history\", filename=\"metrics.csv\")\n\n## Save training loss to csv file\nmodel.save_loss_train(save_path=\"history\", filename=\"loss.csv\")\n\n## Save predicted label\nmodel.save_y_predicted(X=data.X_test, y_true=data.y_test, save_path=\"history\", filename=\"y_predicted.csv\")\n\n## Save model\nmodel.save_model(save_path=\"history\", filename=\"traditional_mlp.pkl\")\n\n## Load model \ntrained_model = RvflRegressor.load_model(load_path=\"history\", filename=\"traditional_mlp.pkl\")\n```\n\n# Support (questions, problems)\n\n### Official Links \n\n* Official source code repo: 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: https://github.com/thieu1995/GrafoRVFL/blob/main/ChangeLog.md\n* Official chat group: https://t.me/+fRVCJGuGJg1mNDg1\n\n* This project also related to our another projects which are \"optimization\" and \"machine learning\", check it here:\n    * https://github.com/thieu1995/mealpy\n    * https://github.com/thieu1995/metaheuristics\n    * https://github.com/thieu1995/opfunu\n    * https://github.com/thieu1995/enoppy\n    * https://github.com/thieu1995/permetrics\n    * https://github.com/thieu1995/MetaCluster\n    * https://github.com/thieu1995/pfevaluator\n    * https://github.com/thieu1995/IntelELM\n    * https://github.com/thieu1995/reflame\n    * https://github.com/thieu1995/MetaPerceptron\n    * https://github.com/aiir-team\n",
    "bugtrack_url": null,
    "license": "GPLv3",
    "summary": "GrafoRVFL: A Python Library for Maximizing Performance of Random Vector Functional Link Network with Gradient-Free Optimization",
    "version": "1.0.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/thieu1995/GrafoRVFL/issues",
        "Change Log": "https://github.com/thieu1995/GrafoRVFL/blob/main/ChangeLog.md",
        "Documentation": "https://graforvfl.readthedocs.io/",
        "Forum": "https://t.me/+fRVCJGuGJg1mNDg1",
        "Homepage": "https://github.com/thieu1995/GrafoRVFL",
        "Source Code": "https://github.com/thieu1995/GrafoRVFL"
    },
    "split_keywords": [
        "random vector functional link",
        "machine learning",
        "artificial intelligence",
        "deep learning",
        "neural networks",
        "single hidden layer network",
        "random projection",
        "rvfl",
        "feed-forward neural network",
        "artificial neural network",
        "classification",
        "regression",
        "supervised learning",
        "online learning",
        "generalization",
        "optimization algorithms",
        "kernel rvfl",
        "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",
        "pearson correlation coefficient (pcc)",
        "spearman correlation coefficient (scc)",
        "global optimization",
        "convergence analysis",
        "search space exploration",
        "local search",
        "computational intelligence",
        "robust optimization",
        "metaheuristic",
        "metaheuristic algorithms",
        "nature-inspired computing",
        "nature-inspired algorithms",
        "swarm-based computation",
        "metaheuristic-based rvfl",
        "gradient-free optimizationgradient-free optimized rvfl",
        "metaheuristic-optimized rvfl",
        "performance analysis",
        "intelligent optimization",
        "simulations"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9c87b3c88ae348896b910216c8f17aaff268aa165b19b93867092551a29b203f",
                "md5": "46cd478446908f68e2322dc87be20aa8",
                "sha256": "d2801bad9b7bb3d6e8362087137cc6a30ac192f2c778e0428b3487371d4f183b"
            },
            "downloads": -1,
            "filename": "graforvfl-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "46cd478446908f68e2322dc87be20aa8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 35341,
            "upload_time": "2023-12-05T02:16:17",
            "upload_time_iso_8601": "2023-12-05T02:16:17.339781Z",
            "url": "https://files.pythonhosted.org/packages/9c/87/b3c88ae348896b910216c8f17aaff268aa165b19b93867092551a29b203f/graforvfl-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "39a00b8debdcfcbf510e0ad8307cdb459b9047909c8c080357526fffea5e1eda",
                "md5": "d7e6360d9b1693100155f4be0c54d5a7",
                "sha256": "a312aa5c29e7d8b80d4ebce1224b442e9f3ba221183b88e44fbea927fd2b6c7d"
            },
            "downloads": -1,
            "filename": "graforvfl-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "d7e6360d9b1693100155f4be0c54d5a7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 36504,
            "upload_time": "2023-12-05T02:16:19",
            "upload_time_iso_8601": "2023-12-05T02:16:19.108812Z",
            "url": "https://files.pythonhosted.org/packages/39/a0/0b8debdcfcbf510e0ad8307cdb459b9047909c8c080357526fffea5e1eda/graforvfl-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-05 02:16:19",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "thieu1995",
    "github_project": "GrafoRVFL",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "graforvfl"
}
        
Elapsed time: 0.19076s