emel v0.3.0 Emel.Ml.NeuralNetwork View Source

A collection of connected neurons, that looks like a biological brain. Each connection, can transmit a signal from one neuron to another.

Link to this section Summary

Functions

Returns the function that classifies an item (or a list of items) by using the Neural Network Framework

Link to this section Functions

Link to this function classifier(dataset, continuous_attributes, class, hidden_layers, learning_rate \\ 0.0001, err_thres \\ 0.1, max_iter \\ 10000) View Source

Returns the function that classifies an item (or a list of items) by using the Neural Network Framework.

Examples

iex> f = Emel.Ml.NeuralNetwork.classifier(
...>          [%{a: 0, b: 0, exclusive_or: false},
...>           %{a: 0, b: 1, exclusive_or: true},
...>           %{a: 1, b: 0, exclusive_or: true},
...>           %{a: 1, b: 1, exclusive_or: false}],
...>          [:a, :b],      # features
...>          :exclusive_or, # class
...>          [2],           # single hidden layer with two neurons
...>          0.5,           # learning rate
...>          0.01,          # error threshold
...>          10000          # maximum number of iterations
...>     )
...> f.([%{a: 0, b: 0},
...>     %{a: 0, b: 1},
...>     %{a: 1, b: 0},
...>     %{a: 1, b: 1}])
[false, true, true, false]