Git Product home page Git Product logo

rbf_net_evolutionary_training's Introduction

RBF Neural Network Evolutionary Training

In this project, I implemented and trained a network to do regression, binary classification and multi class classification. I used evolutionary strategy for training.

In this implementation, the length of chromosome is not fixed, and the algorithm finds the optimum one(find the optimum number of bases).

List of contents:

Evolutionary Strategy Parameters

Representation

If your data is two dimensional:

<σ,x1,y1,r1,x2,y2,r2,...>

Initial Population

I select them randomly and uniformly.

Mutation

τ is changed by random normal distribution.

σ’ = σ • exp(τ • N(0,1))
x’i = xi + σ’ • N(0,1)

Note that τ α 1/ n½

Crossover

It just produce one child.

I assign Pc=0.4

Survivors selection

I use μ+λ and q-tournament methods. I take λ≈7μ and q=5.

Fitness

  • Regression:
e = 0.5 . Transpose(y-y*) . (y-y*)    fitness = 1/e
  • Binary classifier:
fitness = 1-sum(abs(sign(y)-y*))/2L
  • Multi classifier:
fitness = 1-sum(sign(abs(indexMax(y)-indexMax(y*)))))/L

I use one-hot encoding in multi classification.

Network Architecture

You can see the network architecture for regression below:

picture

You can see the network architecture for multi class classifier below:

picture

How to use

You can see how I used it in run.py.

Feed Data

You can feed xlsx data by read_excel method.

Some Results

The result of the dataset in dataset folder, is shown below:

  • Regression:

picture

error: 7%
  • Classification:

picture

picture

picture

picture

precision: 95%
  • Binary Classification:

picture

picture

picture

picture

precision: 98%

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.