Learning algorithm and data storage in software

I come from a web development background and am wondering how I will use the learning algorithm in Java / C ++. Not much of a piece of the algorithm, but forcing the program to "remember" what it learned from the previous day. I would think of something like saving the file, but I suspect it might be easier. I apologize if this question is just above stupid. Thank.

+1


source to share


5 answers


I think it will depend a little on the problem area. You might want to store "facts" or "relationships" in a database so that they can be easily found. If you are training a neural network, you will probably just delete the state of the network into a file. In general, I think that when you have a mechanism that does the training, the appropriate view of the store will be relatively obvious.



Perhaps if you can formulate your plan for what training you would like to implement, people can provide more guidance on how the implementation should look like, including the state store.

+3


source


Not stupid, but a little ill-educated.

What are you going to do, because your program is "learning" to update the state of some data structure. If you want to keep this state, you need to store the data structure in some kind of external storage. This means translating the data structure into some external formal format that you can read losslessly.



Java provides an easy way to do this using the Serializable interface; you Serialize data by sending Serializable exits through ObjectStream; the same ObjectStream will reload them later.

+1


source


If you want to access and store large amounts of data, the database might work well. This will allow you to structure your data and find it easier. I'm not very good at this, but I think that for remembering and recalling things, the database will be vastly superior to the filesystem.

0


source


A reliable / flexible solution in Java (C ++ too, but I don't know how) would use a database. Java 1.6 comes with Apache's Derby database that can be embedded into your applications. Using JPA (Java Persistence API) makes it easy to interact with whatever database you can find drivers in.

0


source


0


source







All Articles