Code Monkey home page Code Monkey logo

neural_network_elixir's Introduction

Neural Network

A neural network made up of layers of neurons connected to each other to form a relationship allowing it to learn. This network is still a work in progress but is far enough along to get an idea of how it works. This is a reimplementation of what was started here: https://github.com/kblake/neural-net-elixir-v1.

After cloning:

$ mix compile

Usage

Run the trainer and see the network learn using OR GATE data

$ mix learn or

You should see output like this:

OR gate learning *********************************************
Epoch: 0   Error: 0.0978034950879825143
Epoch: 1000   Error: 0.0177645755625382047
Epoch: 2000   Error: 0.0065019384961036274
Epoch: 3000   Error: 0.0032527653252166144
Epoch: 4000   Error: 0.0019254900093371497
Epoch: 5000   Error: 0.0012646710040632755
Epoch: 6000   Error: 0.0008910514800247452
Epoch: 7000   Error: 0.0006602873040322224
Epoch: 8000   Error: 0.0005081961006147329
Epoch: 9000   Error: 0.0004028528701046857
Epoch: 9999   Error: 0.0003270377487769315
Epoch: 10000   Error: 0.0003269728572615501
**************************************************************

Run the trainer and see the network learn using IRIS FLOWER GATE data

$ mix learn iris_flower

You should see output like this:

IRIS_FLOWER gate learning *********************************************
Epoch: 0   Error: 0.0164425788515711185
Epoch: 1000   Error: 0.027344153205250403
Epoch: 2000   Error: 0.0265533867778006451
Epoch: 3000   Error: 0.0266624718167679346
Epoch: 4000   Error: 0.0268164947904966262
Epoch: 5000   Error: 0.026857493502782933
Epoch: 6000   Error: 0.026794287038049043
Epoch: 7000   Error: 0.0266556275054049274
Epoch: 8000   Error: 0.0264642981722699525
Epoch: 9000   Error: 0.0262360305030914023
Epoch: 9999   Error: 0.025981881761432242
Epoch: 10000   Error: 0.025981617016649871
**************************************************************

Valid options are: or, and, xor, nand, iris_flower

Run tests

$ mix test

###Huge props

Installation

Available in Hex, the package can be installed as:

  1. Add neural_network to your list of dependencies in mix.exs:

    def deps do [{:neural_network, "~> 0.1.3"}] end

  2. Ensure neural_network is started before your application:

    def application do [applications: [:neural_network]] end

neural_network_elixir's People

Contributors

kblake avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.