Examples of NeuralNode


Examples of weka.classifiers.functions.neural.NeuralNode

          , true);
      return;
    }

        }
        NeuralNode temp = new NeuralNode(String.valueOf(m_nextId),
                 m_random, m_sigmoidUnit);
        m_nextId++;
        temp.setX((double)e.getX() / w);
        temp.setY((double)e.getY() / h);
        tmp.addElement(temp);
        addNode(temp);
        selection(tmp, (e.getModifiers() & MouseEvent.CTRL_MASK) == MouseEvent.CTRL_MASK
      , true);
      }
View Full Code Here

Examples of weka.classifiers.functions.neural.NeuralNode

      }
     
      m_outputs[noa].setX(.9);
      m_outputs[noa].setY((noa + 1.0) / (m_numClasses + 1));
      m_outputs[noa].setLink(false, noa);
      NeuralNode temp = new NeuralNode(String.valueOf(m_nextId), m_random,
               m_sigmoidUnit);
      m_nextId++;
      temp.setX(.75);
      temp.setY((noa + 1.0) / (m_numClasses + 1));
      addNode(temp);
      NeuralConnection.connect(temp, m_outputs[noa]);
    }
  }
View Full Code Here

Examples of weka.classifiers.functions.neural.NeuralNode

      }
      else {
  val = Double.valueOf(c).intValue();
      }
      for (int nob = 0; nob < val; nob++) {
  NeuralNode temp = new NeuralNode(String.valueOf(m_nextId), m_random,
           m_sigmoidUnit);
  m_nextId++;
  temp.setX(.5 / (num) * noa + .25);
  temp.setY((nob + 1.0) / (val + 1));
  addNode(temp);
  if (noa > 0) {
    //then do connections
    for (int noc = m_neuralNodes.length - nob - 1 - prev;
         noc < m_neuralNodes.length - nob - 1; noc++) {
View Full Code Here

Examples of weka.classifiers.functions.neural.NeuralNode

      return buf.toString();
    }
   
    StringBuffer model = new StringBuffer(m_neuralNodes.length * 100);
    //just a rough size guess
    NeuralNode con;
    double[] weights;
    NeuralConnection[] inputs;
    for (int noa = 0; noa < m_neuralNodes.length; noa++) {
      con = (NeuralNode) m_neuralNodes[noa]//this would need a change
                                              //for items other than nodes!!!
      weights = con.getWeights();
      inputs = con.getInputs();
      if (con.getMethod() instanceof SigmoidUnit) {
  model.append("Sigmoid ");
      }
      else if (con.getMethod() instanceof LinearUnit) {
  model.append("Linear ");
      }
      model.append("Node " + con.getId() + "\n    Inputs    Weights\n");
      model.append("    Threshold    " + weights[0] + "\n");
      for (int nob = 1; nob < con.getNumInputs() + 1; nob++) {
  if ((inputs[nob - 1].getType() & NeuralConnection.PURE_INPUT)
      == NeuralConnection.PURE_INPUT) {
    model.append("    Attrib " +
           m_instances.attribute(((NeuralEnd)inputs[nob-1]).
               getLink()).name()
View Full Code Here

Examples of weka.classifiers.functions.neural.NeuralNode

      }
     
      m_outputs[noa].setX(.9);
      m_outputs[noa].setY((noa + 1.0) / (m_numClasses + 1));
      m_outputs[noa].setLink(false, noa);
      NeuralNode temp = new NeuralNode(String.valueOf(m_nextId), m_random,
               m_sigmoidUnit);
      m_nextId++;
      temp.setX(.75);
      temp.setY((noa + 1.0) / (m_numClasses + 1));
      addNode(temp);
      NeuralConnection.connect(temp, m_outputs[noa]);
    }
  }
View Full Code Here

Examples of weka.classifiers.functions.neural.NeuralNode

      }
      else {
  val = Double.valueOf(c).intValue();
      }
      for (int nob = 0; nob < val; nob++) {
  NeuralNode temp = new NeuralNode(String.valueOf(m_nextId), m_random,
           m_sigmoidUnit);
  m_nextId++;
  temp.setX(.5 / (num) * noa + .25);
  temp.setY((nob + 1.0) / (val + 1));
  addNode(temp);
  if (noa > 0) {
    //then do connections
    for (int noc = m_neuralNodes.length - nob - 1 - prev;
         noc < m_neuralNodes.length - nob - 1; noc++) {
View Full Code Here

Examples of weka.classifiers.functions.neural.NeuralNode

      return buf.toString();
    }
   
    StringBuffer model = new StringBuffer(m_neuralNodes.length * 100);
    //just a rough size guess
    NeuralNode con;
    double[] weights;
    NeuralConnection[] inputs;
    for (int noa = 0; noa < m_neuralNodes.length; noa++) {
      con = (NeuralNode) m_neuralNodes[noa]//this would need a change
                                              //for items other than nodes!!!
      weights = con.getWeights();
      inputs = con.getInputs();
      if (con.getMethod() instanceof SigmoidUnit) {
  model.append("Sigmoid ");
      }
      else if (con.getMethod() instanceof LinearUnit) {
  model.append("Linear ");
      }
      model.append("Node " + con.getId() + "\n    Inputs    Weights\n");
      model.append("    Threshold    " + weights[0] + "\n");
      for (int nob = 1; nob < con.getNumInputs() + 1; nob++) {
  if ((inputs[nob - 1].getType() & NeuralConnection.PURE_INPUT)
      == NeuralConnection.PURE_INPUT) {
    model.append("    Attrib " +
           m_instances.attribute(((NeuralEnd)inputs[nob-1]).
               getLink()).name()
View Full Code Here

Examples of weka.classifiers.functions.neural.NeuralNode

          , true);
      return;
    }

        }
        NeuralNode temp = new NeuralNode(String.valueOf(m_nextId),
                 m_random, m_sigmoidUnit);
        m_nextId++;
        temp.setX((double)e.getX() / w);
        temp.setY((double)e.getY() / h);
        tmp.addElement(temp);
        addNode(temp);
        selection(tmp, (e.getModifiers() & MouseEvent.CTRL_MASK) == MouseEvent.CTRL_MASK
      , true);
      }
View Full Code Here

Examples of weka.classifiers.functions.neural.NeuralNode

      }
     
      m_outputs[noa].setX(.9);
      m_outputs[noa].setY((noa + 1.0) / (m_numClasses + 1));
      m_outputs[noa].setLink(false, noa);
      NeuralNode temp = new NeuralNode(String.valueOf(m_nextId), m_random,
               m_sigmoidUnit);
      m_nextId++;
      temp.setX(.75);
      temp.setY((noa + 1.0) / (m_numClasses + 1));
      addNode(temp);
      NeuralConnection.connect(temp, m_outputs[noa]);
    }
  }
View Full Code Here

Examples of weka.classifiers.functions.neural.NeuralNode

      }
      else {
  val = Double.valueOf(c).intValue();
      }
      for (int nob = 0; nob < val; nob++) {
  NeuralNode temp = new NeuralNode(String.valueOf(m_nextId), m_random,
           m_sigmoidUnit);
  m_nextId++;
  temp.setX(.5 / (num) * noa + .25);
  temp.setY((nob + 1.0) / (val + 1));
  addNode(temp);
  if (noa > 0) {
    //then do connections
    for (int noc = m_neuralNodes.length - nob - 1 - prev;
         noc < m_neuralNodes.length - nob - 1; noc++) {
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.