Skip to main content

Evolutionnary Neural Network Model with PyTorch

Project description

GitHub PyPi DOI

https://raw.githubusercontent.com/fabienfrfr/functionalfilet/main/branding/logo.png

Functional Filet is a Python module for machine learning build on top of Pytorch.

This project explores a new method of constructing linear neural networks using evolutionary algorithms and graphs with gradient descent for adjustment of network weights.

More details in the Arxiv preprint An Artificial Neural Network Functionalized by Evolution (model based).

Installation

Dependencies

Functional-Filet requires:

  • Python (>= 3.5)

  • NumPy

  • Pandas

  • PyTorch (>= 1.0.0)

  • Torchvision

  • Matplotlib

  • Networkx

Optionally, you need:

  • Scikit-learn

  • Seaborn

  • Gym


Functional-Filet is stable only from version 0.5.2, any previous version corresponds to the development phase.

However, there are several possible optimizations, in particular on the restructuring of Torch tensors in Python which could be done in C++. For this, it is possible that there will be several code modifications in the future.

The documentation includes more detailed installation and examples instructions.

User installation

If you already have a working installation of numpy and pytorch, the easiest way to install scikit-learn is using pip:

python3 -m pip install functionalfilet

Development

We welcome new contributors of all experience levels.

Source code

You can check the latest sources with the command:

git clone https://github.com/fabienfrfr/functionalfilet.git

Utilization

Once installed, if we consider two variables feature X and label y already executed upstream of the code, here is a simple example of use in the case of a classification problem:

# package
from functionalfilet import model as ff
# init model
model = ff.FunctionalFilet()
# train
model.fit(X,y)
# test
y_pred = model.predict(X, index=seeder_idx)

Existing code

There is in the example directory of the git, several code to play with the learning parameters in simple cases. A brief summary is described at the top of each file:

python3 -m IPython
# universal approximation theorem
run example/uat_regression.py
# classification with overlapping and unbalance
run example/blob_classification.py
# reinforcment leaning with time dependancy
run example/gym_RL-CartPole-v0.py

Citation

If you take inspiration from my machine learning algorithm for a scientific publication, we would appreciate citations:

@article{furfaro2022artificial,
title={An Artificial Neural Network Functionalized by Evolution},
author={Furfaro, Fabien and Bar-Hen, Avner and Berthelot, Geoffroy},
journal={arXiv preprint arXiv:2205.10118},
year={2022}
}

Attribution required : Fabien Furfaro (CC 4.0 BY NC ND SA)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

functionalfilet-0.5.2.tar.gz (16.5 kB view hashes)

Uploaded Source

Built Distribution

functionalfilet-0.5.2-py3-none-any.whl (21.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page