encog

Encog Neural Net - How to structure training data?

偶尔善良 提交于 2019-12-11 03:48:31
问题 Every example I've seen for Encog neural nets has involved XOR or something very simple. I have around 10,000 sentences and each word in the sentence has some type of tag. The input layer needs to take 2 inputs, the previous word and the current word. If there is no previous word, then the 1st input is not activated at all. I need to go through each sentence like this. Each word is contingent on the previous word, so I can't just have an array that looks similar to the XOR example.

Encog: BasicNetwork: Online learning without preconstructed dataset

大兔子大兔子 提交于 2019-12-10 17:02:30
问题 I am trying to use the encog library as a function approximator for a reinforcement learning problem. To be more precise, I am trying to get a multi layer perceptron (BasicNetwork) up and running. Since my agent will somehow explore the world based on whatever RL-algorithm I chose I cannot prebuild any BasicNeuralDataSet as shown in the XOR example. Probably, I have to use the pause() and resume() functions but since I cannot find any documentation or examples on these I am somewhat lost in

Encog load CSV file with customized network

北城以北 提交于 2019-12-10 15:55:59
问题 I want to load data from CSV file like this: var format = new CSVFormat('.', ' '); IVersatileDataSource source = new CSVDataSource(filename, false, format); var data = new VersatileMLDataSet(source); ... Then I have two options: Use EncogModel var model = new EncogModel(data); model.SelectMethod(data, MLMethodFactory.TypeFeedforward); ... Make own network var network = new BasicNetwork(); network.AddLayer(new BasicLayer(null, true, 11)); network.AddLayer(new BasicLayer(new ActivationSigmoid()

How do I normalize a CSV file with Encog?

二次信任 提交于 2019-12-06 01:43:19
问题 I need to normalize a CSV file. I followed this article written by Jeff Heaton. This is (some) of my code: File sourceFile = new File("Book1.csv"); File targetFile = new File("Book1_norm.csv"); EncogAnalyst analyst = new EncogAnalyst(); AnalystWizard wizard = new AnalystWizard(analyst); wizard.wizard(sourceFile, true, AnalystFileFormat.DECPNT_COMMA); final AnalystNormalizeCSV norm = new AnalystNormalizeCSV(); norm.analyze(sourceFile, false, CSVFormat.ENGLISH, analyst); norm

Encog - How to load training data for Neural Network

走远了吗. 提交于 2019-12-05 06:43:12
The NeuralDataSet objects that I've seen in action haven't been anything but XOR which is just two small data arrays... I haven't been able to figure out anything from the documentation on MLDataSet . It seems like everything must be loaded at once. However, I would like to loop through training data until I reach EOF and then count that as 1 epoch.. However, everything I've seen all the data must be loaded into 1 2D array from the beginning. How can I get around this? I've read this question, and the answers didn't really help me . And besides that, I haven't found a similar question asked on

How do I normalize a CSV file with Encog?

≯℡__Kan透↙ 提交于 2019-12-04 05:15:57
I need to normalize a CSV file. I followed this article written by Jeff Heaton . This is (some) of my code: File sourceFile = new File("Book1.csv"); File targetFile = new File("Book1_norm.csv"); EncogAnalyst analyst = new EncogAnalyst(); AnalystWizard wizard = new AnalystWizard(analyst); wizard.wizard(sourceFile, true, AnalystFileFormat.DECPNT_COMMA); final AnalystNormalizeCSV norm = new AnalystNormalizeCSV(); norm.analyze(sourceFile, false, CSVFormat.ENGLISH, analyst); norm.setProduceOutputHeaders(false); norm.normalize(targetFile); The only difference between my code and the one of the