Iss7 - Training Interface
Closed this issue · 1 comments
Currently, training is implemented by loading labelled data into inputs and outputs, and then storing them to the NeuralPso object. The NeuralPso object selects which labels to test based on random selection of labels, maintaining uniformity across positive and negative selections, and returns the cost of the test to the inherited Pso object. NeuralPso also serves a dual purpose to instantiate the virtual fly() and getCost() function, required to train the PSO, while also containing the trained NeuralNet.
To maintain readability, the training aspect of the NeuralPso should be split from NeuralPso and provided through an interface class, NeuralPsoTrainer. Via this class, the correct training operations can be written for the NeuralNet, while leaving the NeuralPso to handle the NeuralNet and Pso interactions. the getCost() function can also be re-implemented, maintaining all abstraction of the data itself at the training interface.
This is important due to the current hectic nature of NeuralPso. If we were to change from PE data to stock market data, many functions inside of NeuralPso will need to be re-written, while others will need to avoid being touched. To maintain the appropriate encapsulation, the separation of the training aspect to a training interface object will improve the ability to make quick modifications to the program in simple steps.
This has been completed.