Page 1 of 1

Neural Network Activation Functions

PostPosted: Sun Jul 13, 2014 8:24 pm
by gawrrell
Hello,

I'm trying to add new activation functions but I'm stuck when I have to create the Derivative2 functions :?.
Here are the functions:
Code: Select all
        // gaussian
        private double Function(double x)
        {
            return Math.Exp(-Math.Pow(x, 2));
        }

        private double Derivative(double x)
        {
            return -2.0 * x * gaussian(x);
        }



        // rational sig
        private double Function(double x)
        {
            return x / (1.0 + Math.Sqrt(1.0 + x * x));
        }

        private double Derivative(double x)
        {
            double val = Math.Sqrt(1.0 + x * x);
            return 1.0 / (val * (1 + val));
        }




        // eliott
        private double Function(double x)
        {
            double s = 1.0;
            return ((x * s) / 2) / (1 + Math.Abs(x * s)) + 0.5;
        }

        private double Derivative(double x)
        {
            double s = 1.0;
            return s / (2.0 * (1.0 + Math.Abs(x * s)) * (1 + Math.Abs(x * s)));
        }


Can you please help me to create Derivative2 functions?

Or there is another way instead of unsing Derivative2 to use Derivative function?

Thanks.

d