Example #1
0
 public NeuralNetwork(DataSetReader dataSet, double[] target, double[] weight, double eta, double bias)
 {
     this.target      = target;
     this.data        = dataSet.data;
     this.featureMask = VectorTools.sequence(dataSet.features);
     this.classMask   = VectorTools.sequence(dataSet.classes);
     this.samples     = dataSet.samples;
     this.weight      = weight;
     this.eta         = eta;
     this.bias        = bias;
 }
Example #2
0
        protected const int MAX_EPOCHS = 1000;          //Limiting the number of iterations in the process.


        /*
         * CONSTRUCTORS
         */
        public NeuralNetwork(DataSetReader dataSet, double[] target, double bias, double eta)
        {
            this.target      = target;
            this.data        = dataSet.data;
            this.featureMask = VectorTools.sequence(dataSet.features);
            this.classMask   = VectorTools.sequence(dataSet.classes);
            this.weight      = VectorTools.ones(this.featureMask.Length + 1);        //+1 for bias.
            this.samples     = dataSet.samples;
            this.eta         = eta;
            this.bias        = bias;
        }