Sha256: 974f9a0ac6426d0ca98ccf0b8bd58009bc78e572c603e1f0da33b2a11f0136a3
Contents?: true
Size: 364 Bytes
Versions: 2
Compression:
Stored size: 364 Bytes
Contents
require 'brainz' # XOR problem brainz = Brainz::Brainz.new brainz.teach(learning_rate: 0.2, momentum: 0.01, wanted_error: 0.01, max_iterations: 2000) do |iteration, error| that(a: 1, b: 1).is(0) that(1, 0).is(1) that(0, 1).is(1) that(0, 0).is(0) end p "Learning took #{brainz.last_iterations}, error: #{brainz.error}, time: #{brainz.learning_time} s."
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
brainz-0.2.0 | examples/xor.rb |
brainz-0.1.3 | examples/xor.rb |