Sha256: a325a356ce1bc641c5e74dd5345ac277a90ca24102cd1c02c5d8683f01ddb1a6
Contents?: true
Size: 903 Bytes
Versions: 2
Compression:
Stored size: 903 Bytes
Contents
require File.dirname(__FILE__) + '/../spec_helper' describe ActivationFunctions do it "should implement logistic Function" do ActivationFunctions.should respond_to(:logistic) end it "should implement logistic Function" do ActivationFunctions.send(:logistic, -10).should satisfy { |n| n < 0.0001 } ActivationFunctions.send(:logistic, 0).should eql(0.5) ActivationFunctions.send(:logistic, 10).should satisfy { |n| n > 0.9999 } end it "should implement binary Function" do ActivationFunctions.should respond_to(:binary) end it "should implement binary Function" do ActivationFunctions.send(:binary, -1).should eql(0) ActivationFunctions.send(:binary, 0).should eql(0) ActivationFunctions.send(:binary, 0.1).should eql(1) ActivationFunctions.send(:binary, 0.5).should eql(1) ActivationFunctions.send(:binary, 1).should eql(1) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
Santino-neurotic-0.0.0 | spec/neurotic/activation_functions_spec.rb |
Santino-neurotic-0.0.1 | spec/neurotic/activation_functions_spec.rb |