LoadObject() public static method

Load the specified object.
public static LoadObject ( FileInfo file ) : Object
file System.IO.FileInfo The file to load.
return Object
Ejemplo n.º 1
0
        public void TestPersistEG()
        {
            BAMNetwork network = Create();

            EncogDirectoryPersistence.SaveObject(EG_FILENAME, network);
            var network2 = (BAMNetwork)EncogDirectoryPersistence.LoadObject(EG_FILENAME);

            ValidateBAM(network2);
        }
Ejemplo n.º 2
0
        public void TestPersistEG()
        {
            BasicPNN network = create();

            EncogDirectoryPersistence.SaveObject((EG_FILENAME), network);
            BasicPNN network2 = (BasicPNN)EncogDirectoryPersistence.LoadObject((EG_FILENAME));

            XOR.VerifyXOR(network2, 0.001);
        }
Ejemplo n.º 3
0
        public void TestPersistEG()
        {
            IPopulation pop = Generate();

            EncogDirectoryPersistence.SaveObject((EG_FILENAME), pop);
            NEATPopulation pop2 = (NEATPopulation)EncogDirectoryPersistence.LoadObject((EG_FILENAME));

            Validate(pop2);
        }
Ejemplo n.º 4
0
        public void TestDiscPersistEG()
        {
            HiddenMarkovModel sourceHMM = BuildDiscHMM();

            EncogDirectoryPersistence.SaveObject(EG_FILENAME, sourceHMM);
            HiddenMarkovModel resultHMM = (HiddenMarkovModel)EncogDirectoryPersistence.LoadObject(EG_FILENAME);

            Validate(resultHMM, sourceHMM);
        }
Ejemplo n.º 5
0
        public void TestPersistEG()
        {
            NEATNetwork network = Create();

            EncogDirectoryPersistence.SaveObject((EG_FILENAME), network);
            NEATNetwork network2 = (NEATNetwork)EncogDirectoryPersistence.LoadObject((EG_FILENAME));

            Validate(network2);
        }
Ejemplo n.º 6
0
        public void TestPersistEG()
        {
            SupportVectorMachine network = Create();

            EncogDirectoryPersistence.SaveObject((EG_FILENAME), network);
            SupportVectorMachine network2 = (SupportVectorMachine)EncogDirectoryPersistence.LoadObject((EG_FILENAME));

            Validate(network2);
        }
        public void TestPersistEG()
        {
            BoltzmannMachine network = new BoltzmannMachine(4);

            network.SetWeight(1, 1, 1);
            network.Threshold[2] = 2;

            EncogDirectoryPersistence.SaveObject(EG_FILENAME, network);
            BoltzmannMachine network2 = (BoltzmannMachine)EncogDirectoryPersistence.LoadObject(EG_FILENAME);

            ValidateHopfield(network2);
        }
Ejemplo n.º 8
0
        public void TestPersistEG()
        {
            HopfieldNetwork network = new HopfieldNetwork(4);

            network.SetWeight(1, 1, 1);
            network.SetProperty("x", 10);

            EncogDirectoryPersistence.SaveObject(EG_FILENAME, network);
            HopfieldNetwork network2 = (HopfieldNetwork)EncogDirectoryPersistence.LoadObject((EG_FILENAME));

            ValidateHopfield(network2);
        }
        public void TestPersistEG()
        {
            IMLDataSet trainingSet = XOR.CreateXORDataSet();
            RBFNetwork network     = new RBFNetwork(2, 4, 1, RBFEnum.Gaussian);

            SVDTraining training = new SVDTraining(network, trainingSet);

            training.Iteration();
            XOR.VerifyXOR(network, 0.1);

            EncogDirectoryPersistence.SaveObject(EG_FILENAME, network);
            RBFNetwork network2 = (RBFNetwork)EncogDirectoryPersistence.LoadObject(EG_FILENAME);

            XOR.VerifyXOR(network2, 0.1);
        }
Ejemplo n.º 10
0
        public void TestPersistMediumEG()
        {
            BasicNetwork network = new BasicNetwork();

            network.AddLayer(new BasicLayer(null, true, 10));
            network.AddLayer(new BasicLayer(new ActivationSigmoid(), true, 10));
            network.AddLayer(new BasicLayer(new ActivationSigmoid(), false, 10));
            network.Structure.FinalizeStructure();
            network.Reset();

            EncogDirectoryPersistence.SaveObject(EG_FILENAME, network);
            BasicNetwork network2 = (BasicNetwork)EncogDirectoryPersistence.LoadObject(EG_FILENAME);

            double d = EngineArray.EuclideanDistance(network.Structure.Flat.Weights,
                                                     network2.Structure.Flat.Weights);

            Assert.IsTrue(d < 0.01);
        }