static INeuralNetwork BuildPsoNetwork()
        {
            var props = new NetworkProperties {
                              InitWeightMin = -0.1,
                              InitWeightMax = 0.1,
                              NumHidden = 2,
                              NumInput = 4,
                              NumOutput = 3
                          };

            var particleProps = new ParticleProperties {
                                        MaxVDelta = 2.0,
                                        MinVDelta = -2.0,
                                        V = 3.0,
                                        VSelf = 2.0,
                                        VSocial = 2.0
                                    };

            var netProps = new PsoNetworkProperties {
                                   DesiredAccuracy = 0.98,
                                   Iterations = 1000,
                                   NumNetworks = 4,
                                   ParticleProps = particleProps
                               };

            return new PsoNetwork(netProps, props, new Random(0));
        }
示例#2
0
 public PsoNetwork(PsoNetworkProperties netProps, NetworkProperties props, Random rng)
 {
     this.PsoProps = netProps;
     this.NetworkProps = props;
     this.rng = rng;
 }
示例#3
0
 public PsoNetwork(PsoNetworkProperties netProps, NetworkProperties props, Random rng)
 {
     this.PsoProps     = netProps;
     this.NetworkProps = props;
     this.rng          = rng;
 }