Module: Neuronet
- Defined in:
- lib/neuronet.rb
Overview
Neuronet module
Defined Under Namespace
Modules: Tao, TaoYang, TaoYin, TaoYinYang, Yang, Yin, YinYang Classes: Connection, FeedForward, Gaussian, InputLayer, Layer, LogNormal, Neuron, Node, Scale, ScaledNetwork
Constant Summary collapse
- VERSION =
'6.0.0'
Class Method Summary collapse
-
.noise ⇒ Object
By default, Neuronet builds a zeroed network.
-
.squash(unsquashed) ⇒ Object
The squash function for Neuronet is the sigmoid function.
- .unsquash(squashed) ⇒ Object
Class Method Details
.noise ⇒ Object
By default, Neuronet builds a zeroed network. Noise adds random fluctuations to create a search for minima.
19 20 21 |
# File 'lib/neuronet.rb', line 19 def self.noise rand + rand end |
.squash(unsquashed) ⇒ Object
The squash function for Neuronet is the sigmoid function. One should scale the problem with most data points between -1 and 1, extremes under 2s, and no outbounds above 3s. Standard deviations from the mean is probably a good way to figure the scale of the problem.
9 10 11 |
# File 'lib/neuronet.rb', line 9 def self.squash(unsquashed) 1.0 / (1.0 + Math.exp(-unsquashed)) end |
.unsquash(squashed) ⇒ Object
13 14 15 |
# File 'lib/neuronet.rb', line 13 def self.unsquash(squashed) Math.log(squashed / (1.0 - squashed)) end |