Module: Neuronet::Tao
- Defined in:
- lib/neuronet.rb
Overview
A Perceptron Hybrid
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.bless(myself) ⇒ Object
355 356 357 358 359 360 361 362 363 364 |
# File 'lib/neuronet.rb', line 355 def self.bless(myself) # @out directly connects to @in myself.out.connect(myself.in) myself.extend Tao # Save current learning and set it to muk(1). l, m = myself.learning, myself.muk # If learning was lower b/4, revert. myself.learning = l if l<m return myself end |
Instance Method Details
#mu ⇒ Object
350 351 352 353 354 |
# File 'lib/neuronet.rb', line 350 def mu sum = super sum += self.first.length * self.last.length return sum end |