Ejemplo n.º 1
0
        public FeedforwardNeuronalNetworkResult <double> Predict(double[] inputValues)
        {
            var classifier = neuronalNetwork.Classify(inputValues);
            FeedforwardNeuronalNetworkResult <double> feedforwardNeuronalNetworkResult =
                new FeedforwardNeuronalNetworkResult <double>();

            feedforwardNeuronalNetworkResult.OutputValues   = classifier;
            feedforwardNeuronalNetworkResult.PredictedValue = classifier[0];
            return(feedforwardNeuronalNetworkResult);
        }
Ejemplo n.º 2
0
        public FeedforwardNeuronalNetworkResult <double> Classify(double[] inputValues)
        {
            var classifier = neuronalNetwork.Classify(inputValues);
            FeedforwardNeuronalNetworkResult <double> feedforwardNeuronalNetworkResult = new FeedforwardNeuronalNetworkResult <double>();

            feedforwardNeuronalNetworkResult.OutputValues = classifier;
            for (int i = 0; i < classifier.Length; i++)
            {
                var actualResult = classifier[i];
                if (feedforwardNeuronalNetworkResult.MaxValue < actualResult)
                {
                    feedforwardNeuronalNetworkResult.MaxValue = actualResult;
                    feedforwardNeuronalNetworkResult.MaxValueOutputPosition = i;
                }
            }
            return(feedforwardNeuronalNetworkResult);
        }