Package com.greentea.relaxation.jnmf.lib.functions

Examples of com.greentea.relaxation.jnmf.lib.functions.IFunction.calc()


         for (int i = 0; i < neuronSteps.size(); ++i)
         {
            NeuronStepInfo outputNeuronStepInfo = neuronSteps.get(i);
            NeuronStepInfo candidateStepInfo = candidateSteps.get(i);
            e += Math.pow(func.calc(outputNeuronStepInfo.net + candidateStepInfo.activation * w) -
                    outputNeuronStepInfo.targetValue, 2);
         }
      }

      return e / (2 * pCount);
 
View Full Code Here


   public void collectInfoFromOutput(Neuron outputNeuron, double targetValue)
   {
      double net = outputNeuron.getNet();
      double act = outputNeuron.getActivation();
      IFunction deriviative = outputNeuron.getActivationFunction().getDerivative();
      double e = (act - targetValue) * deriviative.calc(net);

      NeuronStepInfo neuronStepInfo = new NeuronStepInfo(act, e, net, targetValue);
      addOutputNeuronInfo(outputNeuron, neuronStepInfo);
   }

View Full Code Here

               double avE = calcAvE(outputInfo);

               NeuronStepInfo stepPInfo = outputInfo.get(p);
               IFunction deriviative = candidateNeuron.getActivationFunction().getDerivative();
               sigmaP += Math.signum(calcCj(j, candidateNeuron)) * (stepPInfo.e - avE) *
                       deriviative.calc(candidateInfo.get(p).net);
            }

            sigmas.add(sigmaP);
         }

View Full Code Here

   private double calcSigma(Neuron neuron, double target)
   {
      double net = neuron.getNet();
      IFunction derivative = neuron.getActivationFunction().getDerivative();
      double currentSigma = derivative.calc(net);

      if (neuron.getOutputSynapses().size() == 0)
      {
         // neuron is in last layer
         currentSigma *= (target - neuron.getActivation());
View Full Code Here

         double activation = neuron.getActivation();
         double e = calcError(targetValues.get(i), activation);
         double net = neuron.getNet();

         IFunction deriviative = neuron.getActivationFunction().getDerivative();
         double deriviativeValue = deriviative.calc(net);

         for (Synapse s : neuron.getInputSynapses())
         {
            slopes.put(s, getSlope(s) + (e * deriviativeValue * s.getSource().getActivation()));
         }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.