示例#1
0
文件: Column.cs 项目: smiron/htm
 public Column(TemporalPooler temporalPooler, Parameters parameters, Point2D location)
 {
     _segmentUpdateList = new List<SegmentUpdate>();
     _temporalPooler = temporalPooler;
     _parameters = parameters;
     _location = location;
 }
示例#2
0
        public ColumnReceptiveField(SpatialPoolerInputPipe spatialPoolerInputPipe,
            Parameters parameters, IEnumerable<int> coordonatesXMap, IEnumerable<int> coordonatesYMap)
        {
            m_random = new Random();

            m_spatialPoolerinputPipe = spatialPoolerInputPipe;
            m_parameters = parameters;

            m_coordonatesXMap = coordonatesXMap.ToArray();
            m_coordonatesYMap = coordonatesYMap.ToArray();

            //var synapses = new Synapse[Height, Width];
            //var synapseList = new Synapse[Height * Width];

            //for (int y = 0; y < Height; y++)
            //{
            //    for (int x = 0; x < Width; x++)
            //    {
            //        var synapse = new Synapse(m_parameters, this, x, y, GetRandomPermanence());
            //        synapses[y, x] = synapse;
            //        synapseList[y * Width + x] = synapse;
            //    }
            //}

            //Synapses = synapses;
        }
示例#3
0
文件: Synapse.cs 项目: smiron/htm
        public Synapse(Parameters parameters, ColumnReceptiveField columnReceptiveFieldPipe, 
            int synapseX, int synapseY, double permanence)
        {
            m_parameters = parameters;
            m_columnReceptiveField = columnReceptiveFieldPipe;

            SynapseX = synapseX;
            SynapseY = synapseY;
            Permanence = permanence;
        }
示例#4
0
文件: Column.cs 项目: smiron/htm
        public Column(SpatialPooler spatialPooler, Parameters parameters, 
            ColumnReceptiveField columnReceptiveFieldPipe, Point2D location)
        {
            m_spatialPooler = spatialPooler;
            m_parameters = parameters;
            m_columnReceptiveField = columnReceptiveFieldPipe;

            Location = location;

            m_synapses = m_columnReceptiveField.GetSynapses().ToList();
        }
示例#5
0
        public TemporalPooler(TemporalPoolerInputPipe input, Parameters parameters)
        {
            #region Argument Check

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

            #endregion

            m_input = input;
            m_parameters = parameters;
        }
示例#6
0
文件: Network.cs 项目: smiron/htm
        private Network(SpatialPoolerInputPipe input, int columnCountWidth, int columnCountHeight,
            float minPermanence, int minOverlap, int desiredLocalActivity,
            double permanenceInc, double permanenceDec, int columnActivityHistorySize,
            int numberOfCellsPerColumn, int activationThreshold, int initialPermanence,
            double absoluteMinPermanence, int minActivationThreshold, int newSynapseCount)
        {
            Input = input;

            Parameters = new Parameters
                (minPermanence, minOverlap, desiredLocalActivity,
                permanenceInc, permanenceDec, columnActivityHistorySize,
                columnCountWidth, columnCountHeight, numberOfCellsPerColumn,
                activationThreshold, initialPermanence, absoluteMinPermanence,
                minActivationThreshold, newSynapseCount);

            m_spatialPooler = new SpatialPooler(input, Parameters);
        }
示例#7
0
        public SpatialPooler(SpatialPoolerInputPipe input, Parameters parameters)
        {
            Input = input;
            m_parameters = parameters;

            m_columnList = new List<Column>();

            for (int y = 0; y < parameters.ColumnCountHeight; y++)
            {
                for (int x = 0; x < parameters.ColumnCountWidth; x++)
                {
                    // TODO: add coordonates maps for X and Y

                    m_columnList.Add(new Column(this, m_parameters,
                        new ColumnReceptiveField(input, parameters, null, null), new Point2D(x, y)));
                }
            }
        }