-
-
Notifications
You must be signed in to change notification settings - Fork 32
Neuron
Luis Carbonell edited this page Dec 22, 2018
·
6 revisions
Useful Links
Properties
Key | Type | Default | Description |
---|---|---|---|
connections |
[Connection] |
[] |
All neuron connections |
bias |
Number |
Math.random() |
Check Out: |
learning_rate |
Number |
0.3 |
Check Out: |
activation |
"relu" |"sigmoid" |"tanh" |"step" |"linear" |"leaky-relu" |"softmax" |Function
|
"sigmoid" |
Check Out: |
|
|
Key | Description |
---|---|
connections |
All neuron connections |
bias |
Check out: The Role of Bias in Neural Networks |
learning_rate |
Check out: Overview: What is a "Learning Rate" in a Neural Network |
Instance Functions
Key | Description |
---|---|
Neuron.prototype.is.input() |
Tests whether neuron has no input connections |
Neuron.prototype.is.output() |
Tests whether neuron has no output connections |
Neuron.prototype.connect() |
Connects to another neuron , layer , or group
|
Neuron.prototype.inputs() |
List of incoming connections |
Neuron.prototype.outputs() |
List of outgoing connections |
Neuron.prototype.activate() |
Activation function of neuron |
Neuron.prototype.forward() |
Forward propagates results of Neuron.prototype.activate()
|
Neuron.prototype.learn() |
Updating function of neuron |
Neuron.prototype.backward() |
Backward propagates results of Neuron.prototype.activate()
|
Class Constants
Key | Description |
---|---|
Neuron.activation |
An object of typical activation/squash functions |
Neuron.activation.SIGMOID |
sigmoid Squash Function |
Neuron.activation.ReLU |
ReLU Squash Function |
Neuron.activation.TANH |
tanh Squash Function |
Neuron.activation.IDENTITY |
identity Squash Function |
Neuron.activation.PERCEPTRON |
perceptron Squash Function |
Neuron.update |
An object of typical activation/squash function derivatives |
Neuron.activation.SIGMOID |
sigmoid Squash Function Partial Derivative |
Neuron.activation.ReLU |
ReLU Squash Function Partial Derivative |
Neuron.activation.TANH |
tanh Squash Function Partial Derivative |
Neuron.activation.IDENTITY |
identity Squash Function Partial Derivative |
Neuron.activation.PERCEPTRON |
perceptron Squash Function Partial Derivative |
new Neuron()
-
new Neuron()
: Creates a new neuron. -
new Neuron({ inputs: [n0, n1], outputs: [n2] })
: Creates a new neuron withn0
andn1
as incoming connections, andn2
as an outgoing connection. -
new Neuron(n0)
: Creates a new neuron with the same connections asn0
.is.input([callback])
-
neuron.is.input()
: Returnstrue
ifneuron
has no incoming connections
.is.output([callback])
-
neuron.is.output()
: Returnstrue
ifneuron
has no outgoing connections
.connect(object[, callback])
-
neuron.connect(other_neuron)
: Connectsneuron
toother_neuron
-
neuron.connect(layer)
: Connectsneuron
to every neuron inlayer
-
neuron.connect(group)
: Connectsneuron
to every neuron ingroup
.inputs([callback])
-
.inputs()
: Returns a list of incoming connections toneuron
.outputs([callback])
-
.outputs()
: Returns a list of outgoing connections fromneuron
.activate(inputs[,callback])
-
.activate([0, 1, 0, 1])
: Activatesneuron
with the giveninputs
;inputs.length
must equalconnections.length
forward([callback])
-
.forward()
: Propagates the last result of.activate()
to all outgoing connections
.learn(feedback[,callback])
-
.learn([1, 0, 1, 0])
: Calculates incoming connection errors
.backward([callback])
-
.backward()
: Propagates the last results of.learn()
to all incoming connections