Package org.encog.neural.pattern

Examples of org.encog.neural.pattern.FeedForwardPattern.generate()


    FeedForwardPattern pattern = new FeedForwardPattern();
    pattern.setInputNeurons(this.input[0].length);
    pattern.setOutputNeurons(this.ideal[0].length);
    pattern.addHiddenLayer(8);
    pattern.setActivationFunction(new ActivationSigmoid());
    return (BasicNetwork)pattern.generate();
  }
   
  public BasicNetwork createJordan()
  {
    JordanPattern pattern = new JordanPattern();
View Full Code Here


    FeedForwardPattern pattern = new FeedForwardPattern();
    pattern.setActivationFunction(new ActivationSigmoid());
    pattern.setInputNeurons(1);
    pattern.addHiddenLayer(2);
    pattern.setOutputNeurons(1);
    return (BasicNetwork)pattern.generate();
  }

  public static void main(final String args[]) {
   
    ErrorCalculation.setMode(ErrorCalculationMode.RMS);
View Full Code Here

    }
    if (hidden2 > 0) {
      pattern.addHiddenLayer(hidden2);
    }

    final BasicNetwork network = (BasicNetwork)pattern.generate();
    network.reset();
    return network;
  }

  /**
 
View Full Code Here

    FeedForwardPattern pattern = new FeedForwardPattern();
    pattern.setActivationFunction(new ActivationSigmoid());
    pattern.setInputNeurons(1);
    pattern.addHiddenLayer(6);
    pattern.setOutputNeurons(1);
    return (BasicNetwork)pattern.generate();
  }

  public static void main(final String args[]) {
   
    final TemporalXOR temp = new TemporalXOR();
View Full Code Here

  public void testGreedy()
  {
    FeedForwardPattern pattern = new FeedForwardPattern();
    pattern.setInputNeurons(1);
    pattern.setOutputNeurons(1);
    BasicNetwork network = (BasicNetwork)pattern.generate();
    MockTrain.setFirstElement(3.0,network);
   
    MockTrain mock = new MockTrain();
    mock.setNetwork(network);
    Greedy strategy = new Greedy();
View Full Code Here

  public void testReset()
  {
    FeedForwardPattern pattern = new FeedForwardPattern();
    pattern.setInputNeurons(1);
    pattern.setOutputNeurons(1);
    BasicNetwork network = (BasicNetwork)pattern.generate();
   
    ResetStrategy strategy = new ResetStrategy(0.95,2);
    MockTrain mock = new MockTrain();
    mock.setNetwork(network);
    mock.addStrategy(strategy);
View Full Code Here

  public void testSmart()
  {
    FeedForwardPattern pattern = new FeedForwardPattern();
    pattern.setInputNeurons(1);
    pattern.setOutputNeurons(1);
    BasicNetwork network = (BasicNetwork)pattern.generate();
   
    SmartLearningRate strategy1 = new SmartLearningRate();
    SmartMomentum strategy2 = new SmartMomentum();
    MockTrain mock = new MockTrain();
    mock.setNetwork(network);
View Full Code Here

    FeedForwardPattern pattern = new FeedForwardPattern();
    pattern.setInputNeurons(3);
    pattern.addHiddenLayer(50);
    pattern.setOutputNeurons(1);
    pattern.setActivationFunction(new ActivationTANH());
    BasicNetwork network = (BasicNetwork)pattern.generate();
    network.reset();
    return network;
  }
 
  public static void main(String args[])
View Full Code Here

            feedforward.addHiddenLayer(neuronCount);
          }
        }
        feedforward.setInputNeurons(dialog.getInputCount().getValue());
        feedforward.setOutputNeurons(dialog.getOutputCount().getValue());
        BasicNetwork obj = (BasicNetwork) feedforward.generate();
      } else {
        // try to prune it
        PruneSelective prune = new PruneSelective(network);
        int newInputCount = dialog.getInputCount().getValue();
        int newOutputCount = dialog.getOutputCount().getValue();
View Full Code Here

    else if( activation.equalsIgnoreCase("linear") )
      pattern.setActivationFunction(new ActivationSigmoid());
    else
      throw new EncogScriptError("Uknown activation type: " + activation);
   
    this.network = pattern.generate();
  }
 
  public void jsFunction_evaluate(JSTrainingData data)
  {
    Object obj = ScriptableObject.getProperty(this.getParentScope(),"console");
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.