Example #1
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;
        }
Example #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;
        }
Example #3
0
        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);
        }
Example #4
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)));
                }
            }
        }
Example #5
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)));
                }
            }
        }