lib/newral/functions/base.rb
def move_with_gradient( input:[], output:[], learning_rate: 0.01, step: 0.01 )
         number_of_directions.times do |direction|
          error_gradient = error_gradient_approximation( direction: direction, step: step, input: input, output: output )
          move( direction: direction, step:(-error_gradient*learning_rate))
        end
        self 
      end
# for  general functions we can only estimate the gradient of the error
# by taking small steps
for  general functions we can only estimate the gradient of the error
by taking small steps
for general functions we can only estimate the gradient of the error by taking small steps
def move_with_gradient( input:[], output:[], learning_rate: 0.01, step: 0.01 )
         number_of_directions.times do |direction|
          error_gradient = error_gradient_approximation( direction: direction, step: step, input: input, output: output )
          move( direction: direction, step:(-error_gradient*learning_rate))
        end
        self 
      end
def move_with_gradient ( input : [ ] , output : [ ] , learning_rate : 0.01 , step : 0.01 ) number_of_directions . times do | direction | error_gradient = error_gradient_approximation ( direction : direction , step : step , input : input , output : output ) move ( direction : direction , step : ( - error_gradient * learning_rate ) ) end self end
for  general functions we can only estimate the gradient of the error
by taking small steps
for general functions we can only estimate the gradient of the error by taking small steps
input
output
learning_rate
step