internal LearningConnection(INeuralConnection connection, ILearningRule rule)
        {
            Contract.Requires(connection != null);
            Contract.Requires(rule != null);

            Connection = connection;
            Rule = rule;
        }
        internal void AddConnection(INeuralConnection connection, ILearningRule rule)
        {
            Contract.Requires(connection != null);
            Contract.Requires(rule != null);
            Contract.Requires(rule.AlgorithmType == GetType());

            connectionList.AddLast(new LearningConnection(connection, rule));
        }
 private static void Update(INeuralConnection conn, WeightDecayRule rule)
 {
     double w4 = Math.Pow(conn.Weight, 4.0);
     double div = w4 + rule.Cutoff4;
     if (div != 0.0)
     {
         double delta = (w4 / div) * rule.Factor * conn.Weight;
         conn.Weight += delta;
     }
 }
Exemple #4
0
            internal QuantumWeight(INeuralConnection connection)
            {
                Contract.Requires(connection != null);

                this.connection = connection;
            }
Exemple #5
0
 /// <summary>
 /// Applies an algorithm that utilizes this Trait's Intensity to the Neural Connection
 /// </summary>
 public INeuralConnection AdjustNeuralConnection(INeuralConnection connection)
 {
     return connection;
 }
        /// <summary>
        /// Adds an outbound connection to another node (either another network or a neuron) in the outer network.
        /// </summary>
        /// <param name="outboundConnection">The outbound connection to add.</param>
        public void AddOutboundConnection(INeuralConnection outboundConnection)
        {
            const string MethodName = "AddOutboundConnection";
            Logger.TraceIn(this.name, MethodName);

            if (outboundConnection == null)
            {
                throw new ArgumentNullException("outboundConnection");
            }

            if (!this.outboundConnections.Contains(outboundConnection))
            {
                this.outboundConnections.Add(outboundConnection);
            }

            Logger.TraceOut(this.name, MethodName);
        }
Exemple #7
0
Fichier : Neuron.cs Projet : wowa/n
 public void RemoveNeuralOutput(INeuralConnection conn)
 {
     if (conn.Source == this)
         conn.Destination = null;
     inputConnections.Remove(conn);
 }
Exemple #8
0
Fichier : Neuron.cs Projet : wowa/n
        public void AddNeuralOutput(INeuralConnection conn)
        {
            if (conn.Source != this)
                conn.Source = this;

            outputConnections.Add(conn);
        }
Exemple #9
0
Fichier : Neuron.cs Projet : wowa/n
        public void AddNeuralInput(INeuralConnection conn)
        {
            if (!inputConnections.Contains(conn))
            {
                if (conn.Destination != this)
                    conn.Destination = this;

                inputConnections.Add(conn);
            }
        }