Class Neuron

java.lang.Object
one.empty3.neuralnetwork.Neuron
All Implemented Interfaces:
Comparable
Direct Known Subclasses:
HiddenNeuron, InputNeuron, OutputNeuron

public class Neuron extends Object implements Comparable
  • Field Details

    • input

      protected double[] input
    • output

      protected double output
    • bias

      protected double bias
  • Constructor Details

    • Neuron

      public Neuron(int length)
  • Method Details

    • compute

      public void compute()
    • getW

      public double[] getW()
    • setW

      public void setW(double[] w)
    • getInput

      public double[] getInput()
    • setInput

      public void setInput(double[] input)
    • getOutput

      public double getOutput()
    • setOutput

      public void setOutput(double output)
    • function

      public double function()
    • error

      public double error()
      Not implemented yet
      Returns:
      error double
    • error

      public double error(double[] w)
      Not implemented yet
      Returns:
      error double
    • updateW

      public void updateW()
      Not implemented yet
    • sigmoid

      public double sigmoid(double[] x, double[] w)
    • compareTo

      public int compareTo(Object o)
      Specified by:
      compareTo in interface Comparable
    • initRandom

      public void initRandom(double random)
    • initConstant

      public void initConstant(double random)
    • activation

      public double activation()
    • setBias

      public void setBias(double bias)
    • getBias

      public double getBias()
    • setInputImage

      public void setInputImage(PixM pixM)
    • getLength

      public int getLength()
    • setNetwork

      public void setNetwork(Net<? extends Neuron> network)
    • getLayer

      public Layer<? extends Neuron> getLayer()
    • setLayer

      public void setLayer(Layer<? extends Neuron> layer)
    • getNetwork

      public Net<? extends Neuron> getNetwork()
    • getActivationFunction

      public ActivationFunction getActivationFunction()
    • setActivationFunction

      public void setActivationFunction(ActivationFunction activationFunction)
    • getActivationMethod

      public ActivationMethod getActivationMethod()
    • setActivationMethod

      public void setActivationMethod(ActivationMethod activationMethod)
    • softMax

      public double[] softMax(double[] x, double[] w)
    • save

      public boolean save(DataOutputStream outputStream)
    • read

      public boolean read(DataInputStream inputStream)
    • addNext

      public void addNext(Neuron.Connection connection, Neuron neuron)
    • multiply

      public double[] multiply(double[] input)