Package model.MARK_II

Examples of model.MARK_II.Region


        this.gson = new Gson();
    }

    private NervousSystem constructConnectedNervousSystem() {
        Neocortex unconnectedNeocortex = new Neocortex(new Region("V1", 4, 4,
                4, 50, 3), new RegionToRegionRectangleConnect());

        LGN unconnectedLGN = new LGN(new Region("LGN", 8, 8, 1, 50, 3));

        Retina unconnectedRetina = new Retina(66, 66);

        NervousSystem nervousSystem = new NervousSystem(unconnectedNeocortex,
                unconnectedLGN, unconnectedRetina);
View Full Code Here


        return nervousSystem;
    }

    public void testHowToRunSpatialPoolingOnNervousSystem() throws IOException {
        Retina retina = partialNervousSystem.getPNS().getSNS().getRetina();
        Region LGNRegion = partialNervousSystem.getCNS().getBrain()
                .getThalamus().getLGN().getRegion();

        retina.seeBMPImage("2.bmp");

        SpatialPooler spatialPooler = new SpatialPooler(LGNRegion);
View Full Code Here

    public void setUp() {
        this.gson = new Gson();
    }

    public void test_saveRegionObject() throws IOException {
        Region LGNRegion = new Region("LGN", 8, 8, 1, 50, 3);

        Retina retina = new Retina(66, 66);

        AbstractSensorCellsToRegionConnect retinaToLGN = new SensorCellsToRegionRectangleConnect();
        retinaToLGN.connect(retina.getVisionCells(), LGNRegion, 0, 0);

        // run spatial pooling on a image
        SpatialPooler spatialPooler = new SpatialPooler(LGNRegion);
        spatialPooler.setLearningState(true);

        retina.seeBMPImage("2.bmp");
        Set<Column> LGNNeuronActivity = spatialPooler
                .performPooling();

        assertEquals(11, LGNNeuronActivity.size());

        Gson gson2 = new Gson();
        Region trainedLGNRegion = spatialPooler.getRegion();
        String regionObject = gson2.toJson(trainedLGNRegion);

        JsonFileInputOutput.saveObjectToTextFile(regionObject,
                "./src/test/java/model/util/test_saveRegionObject.txt");
    }
View Full Code Here

    public void test_openRegionObject() throws IOException {
        String regionAsString = JsonFileInputOutput
                .openObjectInTextFile("./src/test/java/model/util/test_saveRegionObject.txt");

        Gson gson2 = new Gson();
        Region trainedLGNRegion = gson2.fromJson(regionAsString, Region.class);
        assertEquals("LGN", trainedLGNRegion.getBiologicalName());
    }
View Full Code Here

    }

    public void test_getActiveColumnPositionsAsString() throws IOException {
        Retina retina = new Retina(66, 66);

        Region region = new Region("region", 8, 8, 4, 50, 1);

        AbstractSensorCellsToRegionConnect connectType2 = new SensorCellsToRegionRectangleConnect();
        connectType2.connect(retina.getVisionCells(), region, 2, 2);

        SpatialPooler spatialPooler = new SpatialPooler(region);
View Full Code Here

TOP

Related Classes of model.MARK_II.Region

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.