AForge.NET

  :: AForge.NET Framework :: Articles :: Forums ::

Neural Network Activation Functions

The forum is to discuss topics from different artificial intelligence areas, like neural networks, genetic algorithms, machine learning, etc.

Neural Network Activation Functions

Postby gawrrell » Sun Jul 13, 2014 8:24 pm

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
gawrrell
 
Posts: 1
Joined: Sun Jul 13, 2014 8:08 pm



Return to Artificial Intelligence