Examples of reset()


Examples of org.encog.mathutil.error.ErrorCalculation.reset()

    {
      error.updateError(actual_good[i], ideal[i], 1.0);
    }
    TestCase.assertEquals(0.0,error.calculateRMS());
   
    error.reset();
   
    for(int i=0;i<ideal.length;i++)
    {
      error.updateError(actual_bad[i], ideal[i], 1.0);
    }
View Full Code Here

Examples of org.encog.ml.bayesian.query.BayesianQuery.reset()

   
    // create a temp query
    BayesianQuery q = this.query.clone();
   
    // first, mark all events as hidden
    q.reset();
   
    // deal with evidence (input)
    for( ParsedEvent parsedEvent : parsedProbability.getGivenEvents() ) {
      BayesianEvent event = this.requireEvent(parsedEvent.getLabel());
      q.defineEventType(event, EventType.Evidence);
View Full Code Here

Examples of org.encog.neural.freeform.FreeformNetwork.reset()

    FreeformLayer outputLayer = network.createOutputLayer(1);
   
    network.connectLayers(inputLayer, hiddenLayer1, new ActivationSigmoid(), 1.0, false);
    network.connectLayers(hiddenLayer1, outputLayer, new ActivationSigmoid(), 1.0, false);
   
    network.reset(1000);
    return network;
  }
}

View Full Code Here

Examples of org.encog.neural.neat.NEATPopulation.reset()

  public static void main(final String args[]) {

    MLDataSet trainingSet = new BasicMLDataSet(XOR_INPUT, XOR_IDEAL);
    NEATPopulation pop = new NEATPopulation(2,1,1000);
    pop.setInitialConnectionDensity(1.0);// not required, but speeds training
    pop.reset();

    CalculateScore score = new TrainingSetScore(trainingSet);
    // train the neural network
   
    final EvolutionaryAlgorithm train = NEATUtil.constructNEATTrainer(pop,score);
View Full Code Here

Examples of org.encog.neural.networks.BasicNetwork.reset()

    network.addLayer(hidden = new BasicLayer(this.activation, true,
        this.hiddenNeurons));
    network.addLayer(new BasicLayer(null, false, this.outputNeurons));
    input.setContextFedBy(hidden);
    network.getStructure().finalizeStructure();
    network.reset();
    return network;
  }

  /**
   * Set the activation function to use on each of the layers.
View Full Code Here

Examples of org.encog.neural.som.SOM.reset()

   *
   * @return The neural network.
   */
  public final MLMethod generate() {
    SOM som = new SOM(this.inputNeurons,this.outputNeurons);
    som.reset();
    return som;
  }

  /**
   * Set the activation function. A SOM uses a linear activation function, so
View Full Code Here

Examples of org.encog.neural.som.training.basic.BestMatchingUnit.reset()

  @Override
  public final double calculateError(final MLDataSet data) {

    final BestMatchingUnit bmu = new BestMatchingUnit(this);

    bmu.reset();

    // Determine the BMU for each training element.
    for (final MLDataPair pair : data) {
      final MLData input = pair.getInput();
      bmu.calculateBMU(input);
View Full Code Here

Examples of org.exist.dom.NewArrayNodeSet.reset()

                        {LOG.info("contextSet and outerNodeSet don't share any document");}
                final NewArrayNodeSet temp = new NewArrayNodeSet(100);
                for (final SequenceIterator i = ancestors.iterate(); i.hasNext();) {
                    NodeProxy p = (NodeProxy) i.nextItem();
                    ContextItem contextNode = p.getContext();
                    temp.reset();
                    while (contextNode != null) {
                        if (contextNode.getContextId() == getExpressionId())
                            {temp.add(contextNode.getNode());}
                        contextNode = contextNode.getNextDirect();
                    }
View Full Code Here

Examples of org.exist.storage.serializers.Serializer.reset()

            if (expandRefs) {
                DBBroker broker = null;
                try {
                    broker = getDatabase().get(null);
                    final Serializer serializer = broker.getSerializer();
                    serializer.reset();
                    serializer.setProperty(Serializer.GENERATE_DOC_EVENTS, "false");
                    serializer.setReceiver(receiver);
                    serializer.toReceiver(document.references[document.alpha[nr]], false, false);
                } catch (final EXistException e) {
                    throw new SAXException(e);
View Full Code Here

Examples of org.exist.util.Base64Encoder.reset()

    public final static void createCredentials() {
        Base64Encoder enc = new Base64Encoder();
        enc.translate("admin:".getBytes());
        credentials = new String(enc.getCharArray());

        enc.reset();
        enc.translate("johndoe:this pw should fail".getBytes());
        badCredentials = new String(enc.getCharArray());
    }

    @Before
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.