Examples of compute()


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

    } while(train.getError() > 0.01);

    // test the neural network
    System.out.println("Neural Network Results:");
    for(MLDataPair pair: trainingSet ) {
      final MLData output = network.compute(pair.getInput());
      System.out.println(pair.getInput().getData(0) + "," + pair.getInput().getData(1)
          + ", actual=" + output.getData(0) + ",ideal=" + pair.getIdeal().getData(0));
    }
  }
}
View Full Code Here

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

    } while(train.getError() > 0.01);

    // test the neural network
    System.out.println("Neural Network Results:");
    for(MLDataPair pair: trainingSet ) {
      final MLData output = network.compute(pair.getInput());
      System.out.println(pair.getInput().getData(0) + "," + pair.getInput().getData(1)
          + ", actual=" + output.getData(0) + ",ideal=" + pair.getIdeal().getData(0));
    }
  }
}
View Full Code Here

Examples of org.encog.neural.rbf.RBFNetwork.compute()

        PrintWriter out = new PrintWriter(outFile);
       
       
            for (MLDataPair pair : trainingSet)
            {
                MLData output = network.compute(pair.getInput());
                //1D//sw.WriteLine(InverseScale(pair.Input[0]) + ", " + Chop(InverseScale(output[0])));// + ", " + pair.Ideal[0]);
                out.println(inverseScale(pair.getInputArray()[0]) + ", " + inverseScale(pair.getInputArray()[1]) + ", " + chop(inverseScale(output.getData(0))));// + ", " + pair.Ideal[0]);// + ",ideal=" + pair.Ideal[0]);
                //3D//sw.WriteLine(InverseScale(pair.Input[0]) + ", " + InverseScale(pair.Input[1]) + ", " + InverseScale(pair.Input[2]) + ", " + Chop(InverseScale(output[0])));// + ", " + pair.Ideal[0]);// + ",ideal=" + pair.Ideal[0]);
                //Console.WriteLine(pair.Input[0] + ", actual=" + output[0] + ",ideal=" + pair.Ideal[0]);
            }
View Full Code Here

Examples of org.gephi.algorithms.shortestpath.AbstractShortestPathAlgorithm.compute()

                    AbstractShortestPathAlgorithm algorithm;
                    if (gc.getModel().getGraphVisible() instanceof DirectedGraph) {
                        DirectedGraph graph = (DirectedGraph) gc.getModel().getGraphVisible();
                        algorithm = new BellmanFordShortestPathAlgorithm(graph, n);
                        algorithm.compute();
                    } else {
                        Graph graph = gc.getModel().getGraphVisible();
                        algorithm = new DijkstraShortestPathAlgorithm(graph, n);
                        algorithm.compute();
                    }
View Full Code Here

Examples of org.gephi.algorithms.shortestpath.AbstractShortestPathAlgorithm.compute()

                        algorithm = new BellmanFordShortestPathAlgorithm(graph, n);
                        algorithm.compute();
                    } else {
                        Graph graph = gc.getModel().getGraphVisible();
                        algorithm = new DijkstraShortestPathAlgorithm(graph, n);
                        algorithm.compute();
                    }

                    //Color
                    LinearGradient linearGradient = new LinearGradient(colors, positions);
View Full Code Here

Examples of org.gephi.algorithms.shortestpath.AbstractShortestPathAlgorithm.compute()

                    if (gc.getModel().getGraphVisible() instanceof DirectedGraph) {
                        algorithm = new BellmanFordShortestPathAlgorithm((DirectedGraph) gc.getModel().getGraphVisible(), sourceNode);
                    } else {
                        algorithm = new DijkstraShortestPathAlgorithm(gc.getModel().getGraphVisible(), sourceNode);
                    }
                    algorithm.compute();

                    double distance;
                    if ((distance = algorithm.getDistances().get(targetNode)) != Double.POSITIVE_INFINITY) {
                        targetNode.getNodeData().setColor(colorArray[0], colorArray[1], colorArray[2]);
                        VizController.getInstance().selectNode(targetNode);
View Full Code Here

Examples of org.graphstream.algorithm.ConnectedComponents.compute()

  }

  private static void printGraphStatus(Graph graph) {
    ConnectedComponents c = new ConnectedComponents();
    c.init(graph);
    c.compute();

    System.out.println("Nodes: " + graph.getNodeCount() + " / Components: " + c.getConnectedComponentsCount());
  }

  private static void removeIsolated(Graph graph, List<Node> gccNodes) {
View Full Code Here

Examples of org.graphstream.algorithm.measure.ClosenessCentrality.compute()

  }

  private static void centrality(Graph graph) {
    ClosenessCentrality c = new ClosenessCentrality("centrality");
    c.init(graph);
    c.compute();
   
    Node maxNode = null;
    double maxCentrality = 0.0;

    for (Node node : graph) {
View Full Code Here

Examples of org.graphstream.ui.layout.springbox.implementations.LinLog.compute()

      if (graph.hasAttribute("ui.viewClosed")) {
        loop = false;
      } else {
        //sleep(1000);       
        layout.compute();
        findCommunities(graph, 1.3);
      }
    }

    System.exit(0);
View Full Code Here

Examples of org.graphstream.ui.layout.springbox.implementations.SpringBox.compute()

    sbox.addAttributeSink(buffer);

    replay.replay(buffer);

    do
      sbox.compute();
    while (sbox.getStabilization() < 0.9);

    buffer.removeSink(sbox);
    sbox.removeAttributeSink(buffer);
  }
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.