Пример #1
0
 public void AddLink(NodeLink Link)
 {
     this._Links.Add(Link);
 }
Пример #2
0
        public override double WeightChange(NodeLink Link)
        {

            // Variables //
            double w = 0;
            double s = Math.Sign(Link.GRADIENT * Link.GRADIENT_LAG);
            double d = Link.DELTA;
            double p = 1 - Link.DELTA / (Link.DELTA + Link.DELTA_LAG);

            if (s > 0)
            {
                d = Math.Min(CEILING, this._UpAxon * d);
                w = d * Math.Sign(Link.GRADIENT) + Link.DELTA * Math.Sign(Link.GRADIENT_LAG);
            }
            else if (s < 0)
            {
                d = Math.Max(FLOOR, this._DownAxon * d);
                w = -Link.WEIGHT_CHANGE * 0.5;
                Link.GRADIENT = 0;
            }
            else
                w = d * Math.Sign(Link.GRADIENT) + Link.DELTA * Math.Sign(Link.GRADIENT_LAG);

            Link.DELTA_LAG = Link.DELTA;
            Link.DELTA = d;
            return w;

        }
Пример #3
0
 public override double WeightChange(NodeLink Link)
 {
     return Link.GRADIENT * this._LearningRate + Link.GRADIENT_LAG * this._Momentum;
 }
Пример #4
0
        public override double WeightChange(NodeLink Link)
        {

            double dx = Link.GRADIENT;
            double dx2 = (Link.GRADIENT - Link.GRADIENT_LAG) / Link.WEIGHT_CHANGE;
            double q = this.Bound(Link.GRADIENT / (Link.GRADIENT_LAG - Link.GRADIENT) * Link.WEIGHT_CHANGE, FLOOR, CEILING);

            if (Math.Abs(Link.GRADIENT) >= Math.Abs(Link.GRADIENT_LAG * this._Scale))
                return Link.GRADIENT * this._Slope + Link.GRADIENT_LAG * this._Acceleration;
            else
                return q;

        }
Пример #5
0
        public override double WeightChange(NodeLink Link)
        {

            // Sign(dx) x LearningRate + Sign(dx2) x Momentum, dx2 = second derivative //
            // dx2 actually is (gradient - lag_gradient) / weight_change, since we dont care about the sign, just multiply //
            return this._GradientWeight * Math.Sign(Link.GRADIENT) + this._MomentumWeight * Math.Sign((Link.GRADIENT - Link.GRADIENT_LAG) * Link.WEIGHT_CHANGE);

        }
Пример #6
0
 public abstract double WeightChange(NodeLink Link);
Пример #7
0
        public override double WeightChange(NodeLink Link)
        {

            // Variables //
            double s = 0;
            double w = 0;
            double d = 0;

            s = Math.Sign(Link.GRADIENT * Link.GRADIENT_LAG);
            d = Link.DELTA;

            if (s > 0)
            {
                d = Math.Min(CEILING, this._UpAxon * d);
                w = d * Math.Sign(Link.GRADIENT);
            }
            else if (s < 0)
            {
                d = Math.Max(FLOOR, this._DownAxon * d);
                if (this._master.MSE > this._LagSSE) w = -Link.WEIGHT_CHANGE;
                Link.GRADIENT = 0;
            }
            else
                w = d * Math.Sign(Link.GRADIENT);

            Link.DELTA_LAG = Link.DELTA;
            Link.DELTA = d;
            this._LagSSE = this._master.MSE;
            return w;

        }
Пример #8
0
        public override double WeightChange(NodeLink Link)
        {

            // Variables //
            double s = 0;
            double w = 0;
            double d = 0;

            s = Math.Sign(Link.GRADIENT * Link.GRADIENT_LAG);
            d = Link.DELTA;

            if (s > 0)
                d = Math.Min(CEILING, this._UpAxon * d);
            else if (s < 0)
                d = Math.Max(FLOOR, this._DownAxon * d);
            w = d * Math.Sign(Link.GRADIENT);

            Link.DELTA_LAG = Link.DELTA;
            Link.DELTA = d;
            return w;

        }