Exemple #1
0
        public bool Initialize()
        {
            // Connect all potentialSynapses.
            double     permanence;
            HTMSynapse synapse;

            foreach (HTMColumn col in _columns)
            {
                // TO DO : get a random sample from the input matrix
                List <HTMCell> cells = _inputCells.GetRectangle(col.X, col.Y, (int)(_inputCells.Width * _proximalSegmentCoverage), (int)(_inputCells.Height * _proximalSegmentCoverage));
                foreach (HTMCell c in cells)
                {
                    permanence = _random.NextGauss(HTMSynapse._connectedPermanence, HTMSynapse._permanenceIncrement * 2.0, true);
                    synapse    = new HTMSynapse(c, permanence);
                    col.ProximalSegment.Synapses.Add(synapse);
                }
            }
            _inhibitionRadius = AverageReceptiveFieldSize();
            return(true);
        }
Exemple #2
0
 public bool Initialize()
 {
     // Connect all potentialSynapses.
     double permanence;
     HTMSynapse synapse;
     foreach (HTMColumn col in _columns)
     {
         // TO DO : get a random sample from the input matrix
         List<HTMCell> cells = _inputCells.GetRectangle(col.X, col.Y, (int)(_inputCells.Width * _proximalSegmentCoverage), (int)(_inputCells.Height * _proximalSegmentCoverage));
         foreach (HTMCell c in cells)
         {
             permanence = _random.NextGauss(HTMSynapse._connectedPermanence, HTMSynapse._permanenceIncrement * 2.0, true);
             synapse = new HTMSynapse(c, permanence);
             col.ProximalSegment.Synapses.Add(synapse);
         }
     }
     _inhibitionRadius = AverageReceptiveFieldSize();
     return true;
 }