{"id":15623174,"url":"https://github.com/jeffheaton/encog-java-core","last_synced_at":"2025-05-16T13:02:54.066Z","repository":{"id":1554635,"uuid":"1943040","full_name":"jeffheaton/encog-java-core","owner":"jeffheaton","description":null,"archived":false,"fork":false,"pushed_at":"2023-03-30T08:26:33.000Z","size":32251,"stargazers_count":742,"open_issues_count":69,"forks_count":268,"subscribers_count":102,"default_branch":"master","last_synced_at":"2024-10-29T22:31:54.039Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.heatonresearch.com/encog","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jeffheaton.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2011-06-23T17:44:40.000Z","updated_at":"2024-09-15T17:54:28.000Z","dependencies_parsed_at":"2023-10-20T21:45:09.324Z","dependency_job_id":null,"html_url":"https://github.com/jeffheaton/encog-java-core","commit_stats":{"total_commits":3531,"total_committers":40,"mean_commits":88.275,"dds":0.4103653355989805,"last_synced_commit":"06bed745403a1a670675b606b6ae483fbf7a6b97"},"previous_names":["encog/encog-java-core"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffheaton%2Fencog-java-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffheaton%2Fencog-java-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffheaton%2Fencog-java-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffheaton%2Fencog-java-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeffheaton","download_url":"https://codeload.github.com/jeffheaton/encog-java-core/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254535826,"owners_count":22087398,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T09:56:38.512Z","updated_at":"2025-05-16T13:02:54.043Z","avatar_url":"https://github.com/jeffheaton.png","language":"Java","funding_links":[],"categories":["人工智能"],"sub_categories":[],"readme":"![Encog Machine Learning Framework](http://www.heatonresearch.com/images/encog128.png)\n\n[![Build Status](https://travis-ci.org/encog/encog-java-core.svg?branch=master)](https://travis-ci.org/encog/encog-java-core)\n\nEncog Machine Learning Framework\n--------------------------------\n\nEncog is a pure-Java/C# machine learning framework that I created back in 2008 to support genetic programming, NEAT/HyperNEAT, and other neural network technologies.  Originally, Encog was created to support research for my master’s degree and early books.  The neural network aspects of Encog proved popular, and Encog was used by a number of people and is cited by [952 academic papers in Google Scholar](https://scholar.google.com/scholar?hl=en\u0026as_sdt=0%2C26\u0026q=encog\u0026btnG=). I created Encog at a time when there were not so many well developed frameworks, such as [TensorFlow](https://medium.com/tensorflow/standardizing-on-keras-guidance-on-high-level-apis-in-tensorflow-2-0-bad2b04c819a), [Keras](https://keras.io/), [DeepLearning4J](https://deeplearning4j.org/), and many others (these are the frameworks I work with the most these days for neural networks).   \n\nEncog continues to be developed (and bugs fixed) for the types of models not covered by the large frameworks and to provide a pure non-GPU Java/C# implementation of several classic neural networks.  Because it is pure Java, the source code for Encog can be much simpler to adapt for cases where you want to implement the neural network yourself from scratch. Some of the less mainstream technologies supported by Encog include [NEAT](https://en.wikipedia.org/wiki/Neuroevolution_of_augmenting_topologies), [HyperNEAT](https://en.wikipedia.org/wiki/HyperNEAT), and [Genetic Programming](https://en.wikipedia.org/wiki/Genetic_programming). Encog has minimal support for computer vision.  Computer vision is a fascinating topic, but just has never been a research interest of mine.\n\nEncog supports a variety of advanced algorithms, as well as support classes to normalize and process data. Machine learning algorithms such as Support Vector Machines, Neural Networks, Bayesian Networks, Hidden Markov Models, Genetic Programming and Genetic Algorithms are supported. Most Encog training algorithms are multi-threaded and scale well to multicore hardware.\n\nEncog continues to be developed, and is used in my own research, for areas that I need Java and are not covered by Keras.  However, for larger-scale cutting edge work, where I do not need to implement the technology from scratch, I make use of Keras/TensorFlow for my own work.\n\nFor more information: [Encog Website](http://www.encog.org)\n\nSimple Java XOR Example in Encog\n--------------------------------\n\n```java\nimport org.encog.Encog;\nimport org.encog.engine.network.activation.ActivationReLU;\nimport org.encog.engine.network.activation.ActivationSigmoid;\nimport org.encog.ml.data.MLData;\nimport org.encog.ml.data.MLDataPair;\nimport org.encog.ml.data.MLDataSet;\nimport org.encog.ml.data.basic.BasicMLDataSet;\nimport org.encog.neural.networks.BasicNetwork;\nimport org.encog.neural.networks.layers.BasicLayer;\nimport org.encog.neural.networks.training.propagation.resilient.ResilientPropagation;\n\npublic class XORHelloWorld {\n\n\t/**\n\t * The input necessary for XOR.\n\t */\n\tpublic static double XOR_INPUT[][] = { { 0.0, 0.0 }, { 1.0, 0.0 },\n\t\t\t{ 0.0, 1.0 }, { 1.0, 1.0 } };\n\n\t/**\n\t * The ideal data necessary for XOR.\n\t */\n\tpublic static double XOR_IDEAL[][] = { { 0.0 }, { 1.0 }, { 1.0 }, { 0.0 } };\n\n\t/**\n\t * The main method.\n\t * @param args No arguments are used.\n\t */\n\tpublic static void main(final String args[]) {\n\n\t\t// create a neural network, without using a factory\n\t\tBasicNetwork network = new BasicNetwork();\n\t\tnetwork.addLayer(new BasicLayer(null,true,2));\n\t\tnetwork.addLayer(new BasicLayer(new ActivationReLU(),true,5));\n\t\tnetwork.addLayer(new BasicLayer(new ActivationSigmoid(),false,1));\n\t\tnetwork.getStructure().finalizeStructure();\n\t\tnetwork.reset();\n\n\t\t// create training data\n\t\tMLDataSet trainingSet = new BasicMLDataSet(XOR_INPUT, XOR_IDEAL);\n\n\t\t// train the neural network\n\t\tfinal ResilientPropagation train = new ResilientPropagation(network, trainingSet);\n\n\t\tint epoch = 1;\n\n\t\tdo {\n\t\t\ttrain.iteration();\n\t\t\tSystem.out.println(\"Epoch #\" + epoch + \" Error:\" + train.getError());\n\t\t\tepoch++;\n\t\t} while(train.getError() \u003e 0.01);\n\t\ttrain.finishTraining();\n\n\t\t// test the neural network\n\t\tSystem.out.println(\"Neural Network Results:\");\n\t\tfor(MLDataPair pair: trainingSet ) {\n\t\t\tfinal MLData output = network.compute(pair.getInput());\n\t\t\tSystem.out.println(pair.getInput().getData(0) + \",\" + pair.getInput().getData(1)\n\t\t\t\t\t+ \", actual=\" + output.getData(0) + \",ideal=\" + pair.getIdeal().getData(0));\n\t\t}\n\n\t\tEncog.getInstance().shutdown();\n\t}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffheaton%2Fencog-java-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeffheaton%2Fencog-java-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffheaton%2Fencog-java-core/lists"}