Top Level Namespace

Defined Under Namespace

Classes: FFNN, NES, NMatrix, NN, Numeric, RNN, SNES, XNES

Instance Method Summary collapse

Instance Method Details

#fit(inds) ⇒ Object


14
15
16
# File 'lib/neuroevo/nes_test.rb', line 14

def fit inds
  inds.collect {|x| sum_of_squares(x) }
end

#sum_of_squares(values) ⇒ Object


10
11
12
# File 'lib/neuroevo/nes_test.rb', line 10

def sum_of_squares values
  values.collect { |v| v**2 }.reduce(:+)
end