Closed JakobMoser closed 6 years ago
The core Encog neural network functions have nothing to do with CSV. The format that an Encog dataset must be in is a IMLDataSet interface format. Usually this is done through a BasicMLDataSet, which is really just a wrapper around a list. Very similar in format to what you have above.
Every use has a different way they want to represent data, so I provided helper classes for CSV, because it is very common. You just need to go a bit more low level if you want to deal with the data directly.
This example shows the basics how how to use these classes and directly send data to Encog:
https://github.com/encog/encog-dotnet-core/blob/master/ConsoleExamples/Examples/XOR/XORHelloWorld.cs
If you prefer using one of the CSV helper functions, you can have a look at its source code and see how it is communicating with the actual neural network. They are just thin wrappers.
I am trying to write a generic ML API that uses EnCog, but I don't want to use a CSV as a datasource but a list of arrays. The way I implemented it is the following:
And I'm setting my data the following way
But my NN predicts totally wrong data. But if I use the
IVersatileDataSource
with a CSV like in all the examples I get the right predictions, so I know it has to be a problem with the datasource.Anybody ever had this problem, or has a solution?