encog

Encog - Training a neural network with Cross-validation methods and validating the training

耗尽温柔 提交于 2020-02-24 00:49:56
问题 I would like to stop training a network once I see the error calculated from the validation set starts to increase. I'm using a BasicNetwork with RPROP as the training algorithm, and I have the following training iteration: void trainCrossValidation(BasicNetwork network, MLDataSet training, MLDataSet validation) { FoldedDataSet folded = new FoldedDataSet(training); Train train = new ResilientPropagation(network, folded); CrossValidationKFold trainFolded = new CrossValidationKFold(train,

Encog: How do I compute without ideal data?

依然范特西╮ 提交于 2020-02-23 07:41:06
问题 Here is an example of my code just to explain my question. (My code is not the XOR example and it has much more data): public static double XOR_INPUT[][] = { { 0.0, 0.0 }, { 1.0, 0.0 }, { 0.0, 1.0 }, { 1.0, 1.0 } }; public static double XOR_IDEAL[][] = { { 0.0 }, { 1.0 }, { 1.0 }, { 0.0 } }; ... MLDataSet trainingSet = new BasicMLDataSet(XOR_INPUT, XOR_IDEAL); ... for(MLDataPair pair: trainingSet ) { final MLData output = network.compute(pair.getInput()); System.out.println(pair.getInput()

How to avoid overfitting (Encog3 C#)?

╄→гoц情女王★ 提交于 2020-01-17 05:32:52
问题 I am new to neural network and I'm working with Encog3. I have created feedforward neural network which can be train and tested. Problem is that I'm not sure how to prevent overfitting. I know I have to split data into training, testing and evaluation set, but I'm not sure where and when to use evaluation set. Currently, I split all data into training and testing set (50%, 50%), train network on one part, test on another. Accuracy is 85%. I tried with CrossValidationKFold but in that case

Encog :“The Machine Learning Method has an input length of 7, but the training has 0” error

旧城冷巷雨未停 提交于 2020-01-03 02:40:13
问题 I'm currently having a project in which I use ENcog(.net) to classify emg signal, the features is already extracted, when I try to train it, it gets error as the title says. Here is the code I use : BasicNetwork JST = new BasicNetwork(); JST.AddLayer(new BasicLayer(7)); JST.AddLayer(new BasicLayer(new ActivationSigmoid(), true, 10)); JST.AddLayer(new BasicLayer(new ActivationLinear(), true, 4)); JST.Structure.FinalizeStructure(); JST.Reset(); openFileDialog1.Title = "Open Feature File...";

Saving networks and weights fro EncogModel

二次信任 提交于 2019-12-13 05:43:24
问题 I was able to create a network, train it and evaluate it using EncogModel. However, i would like to be able to save the network, training and weights, so that every time i run it, i dont have to train it. I found encog persistence, but I'm having a hard time putting encogmodel and percistence together. is there any sample codes available? If not, how could this be done? 回答1: Used: SerializeObject.Save(string path, network); and EncogUtility.SaveEGB( FileInfo path , data);

Encog/neuroph save Neural Network

╄→гoц情女王★ 提交于 2019-12-12 21:30:48
问题 Im new to the Neural Network field(to tell the truth i just started few days back). I want to use neural network in my OCR application to recognize handwritten text. what i want to know is, is it possible to train the network after the initial training. In other words im going to train few characters in the beginning but i want to add more characters to the network later without affecting the existence of the previously trained data.(suppose i've created the neural network with adequate out

C# ENCOG SVM classification with my own dataset

只愿长相守 提交于 2019-12-12 06:38:26
问题 I would like to do a multiclass classification application in C#. I decided to use encog to do so. Now I am stuck at one point. I found a XOR example, which I understand. But when I am going to use my own dataset, app is computing only with one feature from one example. Here is my code: namespace ConsoleApplication1 { public static class Load { public static double[][] FromFile(string path) { var rows = new List<double[]>(); foreach (var line in File.ReadAllLines(path)) { rows.Add(line.Split

Encog RBF C#, Total number of RBF neurons must be some integer to the power of 'dimensions'

夙愿已清 提交于 2019-12-11 06:28:37
问题 I get constantly error Total number of RBF neurons must be some integer to the power of 'dimensions' with using method SetRBFCentersAndWidthsEqualSpacing in C#. Can someone who is familiar with RBF network in Encog check the line 232 in RBFNetwork.cs. I think there is maybe a bug or I miss something: var expectedSideLength = (int) Math.Pow(totalNumHiddenNeurons, 1.0d/dimensions); double cmp = Math.Pow(totalNumHiddenNeurons, 1.0d/dimensions); if (expectedSideLength != cmp) -> error these two