Network

Basic module for creating and using Artificial Neural Networks (ANNs).


type Network

[]

Representing an Artificial Neural Network

Network.create [(1, 0.5), (2, -0.1)] [(1, 2, -0.5)]


create : List.List ( Basics.Int, Basics.Float ) -> List.List ( Basics.Int, Basics.Int, Basics.Float ) -> Network.Network

create function

Network.create [(1, 0.5), (2, -0.1)] [(1, 2, -0.5)]

setValues : List.List ( Basics.Int, Basics.Float ) -> Network.Network -> Network.Network

setValues is used to set values of input nodes

someNetwork |> Network.setValues [(0, 1), (1, -0.5)]

activate : Network.Network -> Network.Network

activate updates the network node values using the Step function

someNetwork |> Network.activate

toString : Network.Network -> String.String

convert Network to String representation

someNetwork |> Network.toString

toDot : Network.Network -> String.String

toDot create graph description see https://en.wikipedia.org/wiki/DOT_(graph_description_language) can be vizualised with https://rise4fun.com/agl or https://dreampuf.github.io/GraphvizOnline/ or using ports with https://github.com/mdaines/viz.js/

Network.create [(0, 1), (1, 0)] [(0, 1, -0.5)]
    |> Network.toDot
    -- == 
    digraph {
        0 [label="0=1"]
        1 [label="1=0"]
        0 -- 1 [label="-0.5"]
    }